You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jørgen Austvik <jo...@extend.no> on 2004/01/13 16:47:42 UTC

RE: Bad envelope namespace

On Tue, 2003-10-14 at 12:49, Schie, Sjaak van wrote:
> You can run the HTTP connection through the axis tcp monitor.
> It's described in the User Guide.
> See "Using the Axis TCP Monitor (tcpmon)" for that.
> 
> I think you sometimes get and invalid page from the server, which in not
> correctly formatted.
> 
> Or maybe you can dump the output in Perl, before it's send to the client.

Hmm, as I said it happens very seldom, but now I have managed to get an
ethereal capture..

Does it look like a server (SOAP::Lite) or a client (Apache AXIS)
problem?

POST /extend/eqs/soap/serv.pl 
HTTP/1.0 Content-Type: text/xml; charse t=utf-8
Accept: application/soap+xml, application/dime, multipart/related,
text/*
User-Agent:  Axis/1.1
Host:  test.extend.no
Cache-Control: no-cache
Pragma:  no-cache
SOAPAction: ""
Content-Length: 826

<?xml version= "1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soape nv:Body>
<ns1:set_revision_chapters
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://www.extend.no/QAweb/SOAP/Serv">
   <ns1:arg0 xsi:type="xsd:string">public</ns1:arg0>
    <ns1:arg1 xsi:type="xsd:int">1 038</ns1:arg1>
    <ns1:arg2 xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[6]"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <item>Rektangel</item>
     <item>0</item>
     <item>Rectangle</item>
    <item>0</item>
     <item></item>
     <item>ffb2b2ff</item>
   </ns1:arg2>
  </ns1:set_revision_chapters>
 </soapenv:Body>
</soapenv:Envelope>   

xxxxxxxxxxxxxxxxxxxxxxxx

HTTP/1.1 500 Internal Server Error
Server Microsoft-IIS/5.0
Date: Tue, 13 Jan 2004  14:26:42 GMT
Content-Length: 633
Content-Type:  text/xml; charset=utf-8
SOAPServer: SOAP::Lite/Perl/0.55

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://www.w3.org/2001/06/soap-encoding"
SOAP-ENV:encodingStyle="http://www.w3.org/2001/06/soap-encoding"
xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode
xsi:type="xsd:string">SOAP-ENV:VersionMismatch</faultcode><faultstring
xsi:type="xsd:string">Wrong SOAP version specified. Supported
versions:.  1 (http://www.w3.org/2001/06/soap-envelope).</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENVBody>
</SOAP-ENV:Envelope>

-- 

Jørgen Austvik

Software developer  |  extend as           |  http://www.extend.no/
jorgen@extend.no    |  Phone: 73 54 51 68  |  Mob: 901 97 886


Axis with HTTP Get?

Posted by Ashley Waite <Gu...@netscape.net>.
Hey all,

I notice that though Axis does allow simple HTTP Get requests (and 
responds with the SOAP Body) I cannot see any way to pass a more complex 
structure to it.

As I develop my WebServices, clients like to have a pretty form they can 
use to check how many features are implemented thus far, and a simple 
HTML form using HTTP Get is the simplest and easiest way to provide this.
The problem is that many of my functions take an XML structure as part 
of the input.

I tried just throwing the xml structure into the HTTP Get to no result 
and was hoping I could avoid writing several servlets to do this, as in 
the final product they'll be useless and I'd prefer not to waste time 
writing them.

So, is there any way that I can pass a structure in using HTTP Get, some 
formatting or something, or is my quest for the easy way fruitless?

Thanks for any help.

-- 
 -
 - Ashley Waite
 - Cormoran Communication
 -



Re: Bad envelope namespace

Posted by Christoph Tratter <tr...@dbai.tuwien.ac.at>.
Hi Jørgen,

the protocol SOAP itself is not backward compatible. A SOAP 
implementation/engine (e.g. Axis) may be so.
The SOAP versions can be detected by means of the namespace of the 
Envelope of the received SOAP message.

I have no idea, why your server behaves the way it does. Sorry for that.

cheers,
Christoph


Jørgen Austvik wrote:

> On Tue, 2004-01-13 at 17:44, Christoph Tratter wrote:
> 
>>Hi Jørgen,
>>
>>The problem is, where you like it to have.
>>In SOAP versioning is accomplished by means of the namespace name for 
>>the SOAP envelope.
>>
>>In your case the Axis client (presumably you have version 1.1 final of 
>>Axis) uses Version 1.1 of SOAP as default. This can be seen from the use 
>>of the namespace name "http://schemas.xmlsoap.org/soap/envelope/" for 
>>the SOAP message.
>>On server-side you have SOAP::Lite.
>>This uses the namespace name "http://www.w3.org/2001/06/soap-envelope". 
>>As far as I see it, this is the Working Draft for SOAP 1.2 from July 9 2001.
>>
>>So the client "speaks" SOAP 1.1 whereas the server wants to "speak" SOAP 
>>  1.2.
>>It should be clear, that they do not understand each other. The SOAP 
>>specification says, that a not supported version (i.e. namespace) must 
>>result in the reponse (Fault) you get.
> 
> 
> Oh, I imagined that SOAP was backwards compatible between minor
> versions.
> 
> The strange thing is that it works between the same server and client
> for a month with the same calls, and often the same parameters to the
> calls. Then it stops to work until we restart the server. Shouldn't this
> version-incompatiblity make it fail every time?
> 


Re: Bad envelope namespace

Posted by Jørgen Austvik <jo...@extend.no>.
On Tue, 2004-01-13 at 17:44, Christoph Tratter wrote:
> Hi Jørgen,
> 
> The problem is, where you like it to have.
> In SOAP versioning is accomplished by means of the namespace name for 
> the SOAP envelope.
> 
> In your case the Axis client (presumably you have version 1.1 final of 
> Axis) uses Version 1.1 of SOAP as default. This can be seen from the use 
> of the namespace name "http://schemas.xmlsoap.org/soap/envelope/" for 
> the SOAP message.
> On server-side you have SOAP::Lite.
> This uses the namespace name "http://www.w3.org/2001/06/soap-envelope". 
> As far as I see it, this is the Working Draft for SOAP 1.2 from July 9 2001.
> 
> So the client "speaks" SOAP 1.1 whereas the server wants to "speak" SOAP 
>   1.2.
> It should be clear, that they do not understand each other. The SOAP 
> specification says, that a not supported version (i.e. namespace) must 
> result in the reponse (Fault) you get.

Oh, I imagined that SOAP was backwards compatible between minor
versions.

The strange thing is that it works between the same server and client
for a month with the same calls, and often the same parameters to the
calls. Then it stops to work until we restart the server. Shouldn't this
version-incompatiblity make it fail every time?

-- 

Jørgen Austvik

Software developer  |  extend as           |  http://www.extend.no/
jorgen@extend.no    |  Phone: 73 54 51 68  |  Mob: 901 97 886


Re: Bad envelope namespace

Posted by Christoph Tratter <tr...@dbai.tuwien.ac.at>.
Hi Jørgen,

The problem is, where you like it to have.
In SOAP versioning is accomplished by means of the namespace name for 
the SOAP envelope.

In your case the Axis client (presumably you have version 1.1 final of 
Axis) uses Version 1.1 of SOAP as default. This can be seen from the use 
of the namespace name "http://schemas.xmlsoap.org/soap/envelope/" for 
the SOAP message.
On server-side you have SOAP::Lite.
This uses the namespace name "http://www.w3.org/2001/06/soap-envelope". 
As far as I see it, this is the Working Draft for SOAP 1.2 from July 9 2001.

So the client "speaks" SOAP 1.1 whereas the server wants to "speak" SOAP 
  1.2.
It should be clear, that they do not understand each other. The SOAP 
specification says, that a not supported version (i.e. namespace) must 
result in the reponse (Fault) you get.

I don't know if updating one or both sides will entirely solve this problem.

Axis (1.1) claims to support version 1.2 of SOAP 
(http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages/StandardsSupported), 
although of course not its final W3C Recommendation as seen in 
http://www.w3.org/TR/soap12-part1/.
The problem is that the recommendation dates from June 23 2003 and has a 
namespace name "http://www.w3.org/2003/05/soap-envelope".
Axis 1.1 dates from June 16 2003.
It supports SOAP 1.2, but with the namespace name 
"http://www.w3.org/2002/12/soap-envelope", which means that Axis 
implements the "Last Call Working Draft" for SOAP 1.2 from December 2002.

Imho, you should at least trying to update the server side, to a version 
that understands SOAP 1.1 _and_ 1.2. I don't know if that's possible, as 
I don't know SOAP::Lite.
SOAP 1.1 is common and SOAP 1.2 will become.

If you update the server to a version that only understands SOAP 1.2, 
you still have to find a solution for the Axis client, though, because 
Axis 1.1 does not yet have the correct SOAP 1.2 namespace name. Maybe 
this is already implemented in Axis 1.2 Alpha.

It's a bit complicated, I hope you'll find a solution.

cheers,
Christoph

PS:
Actually I don't know how to tell an Axis client that it should use SOAP 
1.2.
Does anybody else know?


Jørgen Austvik wrote:

> On Tue, 2003-10-14 at 12:49, Schie, Sjaak van wrote:
> 
>>You can run the HTTP connection through the axis tcp monitor.
>>It's described in the User Guide.
>>See "Using the Axis TCP Monitor (tcpmon)" for that.
>>
>>I think you sometimes get and invalid page from the server, which in not
>>correctly formatted.
>>
>>Or maybe you can dump the output in Perl, before it's send to the client.
> 
> 
> Hmm, as I said it happens very seldom, but now I have managed to get an
> ethereal capture..
> 
> Does it look like a server (SOAP::Lite) or a client (Apache AXIS)
> problem?
> 
> POST /extend/eqs/soap/serv.pl 
> HTTP/1.0 Content-Type: text/xml; charse t=utf-8
> Accept: application/soap+xml, application/dime, multipart/related,
> text/*
> User-Agent:  Axis/1.1
> Host:  test.extend.no
> Cache-Control: no-cache
> Pragma:  no-cache
> SOAPAction: ""
> Content-Length: 826
> 
> <?xml version= "1.0" encoding="UTF-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soape nv:Body>
> <ns1:set_revision_chapters
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns1="http://www.extend.no/QAweb/SOAP/Serv">
>    <ns1:arg0 xsi:type="xsd:string">public</ns1:arg0>
>     <ns1:arg1 xsi:type="xsd:int">1 038</ns1:arg1>
>     <ns1:arg2 xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[6]"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
>     <item>Rektangel</item>
>      <item>0</item>
>      <item>Rectangle</item>
>     <item>0</item>
>      <item></item>
>      <item>ffb2b2ff</item>
>    </ns1:arg2>
>   </ns1:set_revision_chapters>
>  </soapenv:Body>
> </soapenv:Envelope>   
> 
> xxxxxxxxxxxxxxxxxxxxxxxx
> 
> HTTP/1.1 500 Internal Server Error
> Server Microsoft-IIS/5.0
> Date: Tue, 13 Jan 2004  14:26:42 GMT
> Content-Length: 633
> Content-Type:  text/xml; charset=utf-8
> SOAPServer: SOAP::Lite/Perl/0.55
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENC="http://www.w3.org/2001/06/soap-encoding"
> SOAP-ENV:encodingStyle="http://www.w3.org/2001/06/soap-encoding"
> xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode
> xsi:type="xsd:string">SOAP-ENV:VersionMismatch</faultcode><faultstring
> xsi:type="xsd:string">Wrong SOAP version specified. Supported
> versions:.  1 (http://www.w3.org/2001/06/soap-envelope).</faultstring>
> </SOAP-ENV:Fault>
> </SOAP-ENVBody>
> </SOAP-ENV:Envelope>
>