You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org> on 2005/02/14 15:00:11 UTC

[jira] Resolved: (AXISCPP-368) IHandlerSoapSerializer->setSoapVersion creates incorrect and duplicate namespaces in header

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

     Resolution: Fixed
    Fix Version: 1.5 Final

I have fixed the namespace duplication problem and tested successfully.

Regarding the server complaining on bad 1.2 namespace; digging into SOAP spec, in case the server is SOAP 1.1 and client is using 1.2 (or vice versa) there should be a SOAP fault thrown. This may be the reason that the server complain.


> 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
>   Components: SOAP
>     Reporter: Andrew Perry
>     Assignee: Samisa Abeysinghe
>      Fix For: 1.5 Final

>
> 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