[ http://issues.apache.org/jira/browse/AXISCPP-368?page=history ]

Andrew Perry updated AXISCPP-368:
---------------------------------

        Summary: IHandlerSoapSerializer->setSoapVersion creates incorrect and 
duplicate namespaces in header  (was: IHandlerSoapSerializer->setSoapVersion 
creates duplicate namespaces in header)
    Description: 
When I add call setSoapVersion in a handler, the SOAP Header adds incorrect and 
duplicate namespaces which causes the web service call to fail. I have 2 
handler tests, the only difference is "pISZ->setSoapVersion(SOAP_VER_1_2);" 
where pISZ is a pointer to the IHandlerSoapSerializer retrieved from the 
IMessageData object.

The first working test produces this soap message:

----------------------------------
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<SOAP-ENV:Header><ns2:echoMeString 
xmlns:ns2="http://soapinterop.org/echoheader/";>test Header 
Val</ns2:echoMeString></SOAP-ENV:Header>
<SOAP-ENV:Body>
...
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
----------------------------------

And the second failing tests with the setSoapVersion call produces this soap 
message

----------------------------------
<?xml version='1.0' encoding='utf-8' ?>
<env:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:env="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<env:Header><ns2:echoMeString 
xmlns:ns2="http://soapinterop.org/soapversion/";>Soap Version 
Test</ns2:echoMeString></env:Header>
<env:Body>
...
</env:Body>
</env:Envelope>
----------------------------------

As can be seen env is defined, but is different to SOAP-ENV which is also 
defined but never used, and also the xsd and xsi namespaces are defined twice, 
though consistantly. When this message is sent the web server throws the 
following message

----- snippit --------------------
Bad envelope namespace:  http://www.w3.org/2003/05/soap-envelope
----------------------------------

which is the definition of the env namespace which is used. The SOAP-ENV 
namespace is correct.



  was:
When I add call setSoapVersion in a handler, the SOAP Header adds duplicate 
namespaces which causes the web service call to fail. I have 2 handler tests, 
the only difference is "pISZ->setSoapVersion(SOAP_VER_1_2);" where pISZ is a 
pointer to the IHandlerSoapSerializer retrieved from the IMessageData object.

The first working test produces this soap message:

----------------------------------
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<SOAP-ENV:Header><ns2:echoMeString 
xmlns:ns2="http://soapinterop.org/echoheader/";>test Header 
Val</ns2:echoMeString></SOAP-ENV:Header>
<SOAP-ENV:Body>
...
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
----------------------------------

And the second failing tests with the setSoapVersion call produces this soap 
message

----------------------------------
<?xml version='1.0' encoding='utf-8' ?>
<env:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:env="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<env:Header><ns2:echoMeString 
xmlns:ns2="http://soapinterop.org/soapversion/";>Soap Version 
Test</ns2:echoMeString></env:Header>
<env:Body>
...
</env:Body>
</env:Envelope>
----------------------------------

As can be seen env is defined, but is different to SOAP-ENV which is also 
defined but never used, and also the xsd and xsi namespaces are defined twice 
though consistantly. When this message is sent the web server throws the 
following message

----- snippit --------------------
Bad envelope namespace:  http://www.w3.org/2003/05/soap-envelope
----------------------------------

which is the definition of the env namespace which is used. The SOAP-ENV 
namespace is correct.




> IHandlerSoapSerializer->setSoapVersion creates incorrect and duplicate 
> namespaces in header
> -------------------------------------------------------------------------------------------
>
>          Key: AXISCPP-368
>          URL: http://issues.apache.org/jira/browse/AXISCPP-368
>      Project: Axis-C++
>         Type: Bug
>     Reporter: Andrew Perry

>
> When I add call setSoapVersion in a handler, the SOAP Header adds incorrect 
> and duplicate namespaces which causes the web service call to fail. I have 2 
> handler tests, the only difference is "pISZ->setSoapVersion(SOAP_VER_1_2);" 
> where pISZ is a pointer to the IHandlerSoapSerializer retrieved from the 
> IMessageData object.
> The first working test produces this soap message:
> ----------------------------------
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> <SOAP-ENV:Header><ns2:echoMeString 
> xmlns:ns2="http://soapinterop.org/echoheader/";>test Header 
> Val</ns2:echoMeString></SOAP-ENV:Header>
> <SOAP-ENV:Body>
> ...
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> ----------------------------------
> And the second failing tests with the setSoapVersion call produces this soap 
> message
> ----------------------------------
> <?xml version='1.0' encoding='utf-8' ?>
> <env:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xmlns:env="http://www.w3.org/2003/05/soap-envelope"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> <env:Header><ns2:echoMeString 
> xmlns:ns2="http://soapinterop.org/soapversion/";>Soap Version 
> Test</ns2:echoMeString></env:Header>
> <env:Body>
> ...
> </env:Body>
> </env:Envelope>
> ----------------------------------
> As can be seen env is defined, but is different to SOAP-ENV which is also 
> defined but never used, and also the xsd and xsi namespaces are defined 
> twice, though consistantly. When this message is sent the web server throws 
> the following message
> ----- snippit --------------------
> Bad envelope namespace:  http://www.w3.org/2003/05/soap-envelope
> ----------------------------------
> which is the definition of the env namespace which is used. The SOAP-ENV 
> namespace is correct.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to