You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Jim Hazen <ji...@myplay.com> on 2001/05/23 02:06:21 UTC

SOAP 2.2 Server returns invalid messages

I'm getting a rather strange error.  The messages that come back from the
rpcrouter seem to be malformed.  At least I get the following error when I try
to run the following client code:

ServerUtils.readEnvelopeFromInputStream() on the below message.  This message is
being returned from a SOAP 2.2 server, and used to work under 2.1.

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:instantiateOfferResponse xmlns:ns1="urn:SubscriptionService"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:int">3</return>
</ns1:instantiateOfferResponse>

</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

java.lang.IllegalArgumentException: Root element of a SOAP message must be:
'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
java.lang.IllegalArgumentException: Root element of a SOAP message must be:
'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
        at org.apache.soap.Envelope.unmarshall(Envelope.java:306)
        at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
        at
org.apache.soap.transport.TransportMessage.unmarshall(TransportMessage.java:279)

        at
org.apache.soap.server.ServerUtils.readEnvelopeFromInputStream(ServerUtils.java:121)

        ...

This message looks good to me.  At the very least you'd think that an envelope
generated by a SOAP 2.2 server should be able to be parsed by that same server.

Can anyone help me with this?  This is a 2.2 show stopper for me.

Thanks,
Jim


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: SOAP 2.2 Server returns invalid messages

Posted by Jim Hazen <ji...@myplay.com>.
I've made sure that I'm using the latest soap.jar from the soap2.2rc2 distro.
I'm also using Xerces 1.2.3.  This setup is identical to what used to work for
me under 2.1, except that I'm using soap 2.2 and have changed some of my code to
use DocumentBuilders instead of the Xerces specific calls.

This seems to be an application level error.  Can you tell me which version of
SOAP would generate this error?  The XML that is being generated seems like a
valid 2.1 message.  I don't see why this would break with an upgrade to 2.2.

I suppose that Xerces 1.2.3 might not be fully JAXP compliant, and that SOAP is
in fact not using the first compiler in the classpath because it doesn't have
the required API support.  However I've looked at the xerces.jar and it seems
like it includes the all the JAXP classes.

Any suggestions?  Is the below XML message a valid 2.2 message?

-Jim

> It seem that you have some older stuff on your classpath or in the
> server's cache. If you're using Tomcat please remove the old work
> directory and try again. Alternatively, is it possible to try in
> an Apache SOAP virgin environment?
>
> Thanks,
>
> Sanjiva.
>
> ----- Original Message -----
> From: "Jim Hazen" <ji...@myplay.com>
> To: <so...@xml.apache.org>
> Sent: Tuesday, May 22, 2001 8:06 PM
> Subject: SOAP 2.2 Server returns invalid messages
>
> > I'm getting a rather strange error.  The messages that come back from the
> > rpcrouter seem to be malformed.  At least I get the following error when I
> try
> > to run the following client code:
> >
> > ServerUtils.readEnvelopeFromInputStream() on the below message.  This
> message is
> > being returned from a SOAP 2.2 server, and used to work under 2.1.
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> > <SOAP-ENV:Body>
> > <ns1:instantiateOfferResponse xmlns:ns1="urn:SubscriptionService"
> > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > <return xsi:type="xsd:int">3</return>
> > </ns1:instantiateOfferResponse>
> >
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> >
> > java.lang.IllegalArgumentException: Root element of a SOAP message must
> be:
> > 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
> > java.lang.IllegalArgumentException: Root element of a SOAP message must
> be:
> > 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
> >         at org.apache.soap.Envelope.unmarshall(Envelope.java:306)
> >         at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
> >         at
> >
> org.apache.soap.transport.TransportMessage.unmarshall(TransportMessage.java:
> 279)
> >
> >         at
> >
> org.apache.soap.server.ServerUtils.readEnvelopeFromInputStream(ServerUtils.j
> ava:121)
> >
> >         ...
> >
> > This message looks good to me.  At the very least you'd think that an
> envelope
> > generated by a SOAP 2.2 server should be able to be parsed by that same
> server.
> >
> > Can anyone help me with this?  This is a 2.2 show stopper for me.
> >
> > Thanks,
> > Jim
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: SOAP 2.2 Server returns invalid messages

Posted by Jim Hazen <ji...@myplay.com>.
I've made sure that I'm using the latest soap.jar from the soap2.2rc2 distro.
I'm also using Xerces 1.2.3.  This setup is identical to what used to work for
me under 2.1, except that I'm using soap 2.2 and have changed some of my code to
use DocumentBuilders instead of the Xerces specific calls.

This seems to be an application level error.  Can you tell me which version of
SOAP would generate this error?  The XML that is being generated seems like a
valid 2.1 message.  I don't see why this would break with an upgrade to 2.2.

I suppose that Xerces 1.2.3 might not be fully JAXP compliant, and that SOAP is
in fact not using the first compiler in the classpath because it doesn't have
the required API support.  However I've looked at the xerces.jar and it seems
like it includes the all the JAXP classes.

Any suggestions?  Is the below XML message a valid 2.2 message?

-Jim

> It seem that you have some older stuff on your classpath or in the
> server's cache. If you're using Tomcat please remove the old work
> directory and try again. Alternatively, is it possible to try in
> an Apache SOAP virgin environment?
>
> Thanks,
>
> Sanjiva.
>
> ----- Original Message -----
> From: "Jim Hazen" <ji...@myplay.com>
> To: <so...@xml.apache.org>
> Sent: Tuesday, May 22, 2001 8:06 PM
> Subject: SOAP 2.2 Server returns invalid messages
>
> > I'm getting a rather strange error.  The messages that come back from the
> > rpcrouter seem to be malformed.  At least I get the following error when I
> try
> > to run the following client code:
> >
> > ServerUtils.readEnvelopeFromInputStream() on the below message.  This
> message is
> > being returned from a SOAP 2.2 server, and used to work under 2.1.
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> > <SOAP-ENV:Body>
> > <ns1:instantiateOfferResponse xmlns:ns1="urn:SubscriptionService"
> > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > <return xsi:type="xsd:int">3</return>
> > </ns1:instantiateOfferResponse>
> >
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> >
> > java.lang.IllegalArgumentException: Root element of a SOAP message must
> be:
> > 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
> > java.lang.IllegalArgumentException: Root element of a SOAP message must
> be:
> > 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
> >         at org.apache.soap.Envelope.unmarshall(Envelope.java:306)
> >         at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
> >         at
> >
> org.apache.soap.transport.TransportMessage.unmarshall(TransportMessage.java:
> 279)
> >
> >         at
> >
> org.apache.soap.server.ServerUtils.readEnvelopeFromInputStream(ServerUtils.j
> ava:121)
> >
> >         ...
> >
> > This message looks good to me.  At the very least you'd think that an
> envelope
> > generated by a SOAP 2.2 server should be able to be parsed by that same
> server.
> >
> > Can anyone help me with this?  This is a 2.2 show stopper for me.
> >
> > Thanks,
> > Jim
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: SOAP 2.2 Server returns invalid messages

Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
It seem that you have some older stuff on your classpath or in the
server's cache. If you're using Tomcat please remove the old work
directory and try again. Alternatively, is it possible to try in
an Apache SOAP virgin environment?

Thanks,

Sanjiva.

----- Original Message -----
From: "Jim Hazen" <ji...@myplay.com>
To: <so...@xml.apache.org>
Sent: Tuesday, May 22, 2001 8:06 PM
Subject: SOAP 2.2 Server returns invalid messages


> I'm getting a rather strange error.  The messages that come back from the
> rpcrouter seem to be malformed.  At least I get the following error when I
try
> to run the following client code:
>
> ServerUtils.readEnvelopeFromInputStream() on the below message.  This
message is
> being returned from a SOAP 2.2 server, and used to work under 2.1.
>
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:instantiateOfferResponse xmlns:ns1="urn:SubscriptionService"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <return xsi:type="xsd:int">3</return>
> </ns1:instantiateOfferResponse>
>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> java.lang.IllegalArgumentException: Root element of a SOAP message must
be:
> 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
> java.lang.IllegalArgumentException: Root element of a SOAP message must
be:
> 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
>         at org.apache.soap.Envelope.unmarshall(Envelope.java:306)
>         at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
>         at
>
org.apache.soap.transport.TransportMessage.unmarshall(TransportMessage.java:
279)
>
>         at
>
org.apache.soap.server.ServerUtils.readEnvelopeFromInputStream(ServerUtils.j
ava:121)
>
>         ...
>
> This message looks good to me.  At the very least you'd think that an
envelope
> generated by a SOAP 2.2 server should be able to be parsed by that same
server.
>
> Can anyone help me with this?  This is a 2.2 show stopper for me.
>
> Thanks,
> Jim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: SOAP 2.2 Server returns invalid messages

Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
It seem that you have some older stuff on your classpath or in the
server's cache. If you're using Tomcat please remove the old work
directory and try again. Alternatively, is it possible to try in
an Apache SOAP virgin environment?

Thanks,

Sanjiva.

----- Original Message -----
From: "Jim Hazen" <ji...@myplay.com>
To: <so...@xml.apache.org>
Sent: Tuesday, May 22, 2001 8:06 PM
Subject: SOAP 2.2 Server returns invalid messages


> I'm getting a rather strange error.  The messages that come back from the
> rpcrouter seem to be malformed.  At least I get the following error when I
try
> to run the following client code:
>
> ServerUtils.readEnvelopeFromInputStream() on the below message.  This
message is
> being returned from a SOAP 2.2 server, and used to work under 2.1.
>
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:instantiateOfferResponse xmlns:ns1="urn:SubscriptionService"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <return xsi:type="xsd:int">3</return>
> </ns1:instantiateOfferResponse>
>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> java.lang.IllegalArgumentException: Root element of a SOAP message must
be:
> 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
> java.lang.IllegalArgumentException: Root element of a SOAP message must
be:
> 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
>         at org.apache.soap.Envelope.unmarshall(Envelope.java:306)
>         at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
>         at
>
org.apache.soap.transport.TransportMessage.unmarshall(TransportMessage.java:
279)
>
>         at
>
org.apache.soap.server.ServerUtils.readEnvelopeFromInputStream(ServerUtils.j
ava:121)
>
>         ...
>
> This message looks good to me.  At the very least you'd think that an
envelope
> generated by a SOAP 2.2 server should be able to be parsed by that same
server.
>
> Can anyone help me with this?  This is a 2.2 show stopper for me.
>
> Thanks,
> Jim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org