[ 
http://issues.apache.org/jira/browse/AXISCPP-363?page=comments#action_12314041 
] 

Samisa Abeysinghe commented on AXISCPP-363:
-------------------------------------------

Hi All,
   I made a bit disturbing discovery in the code generator while
looking into http://issues.apache.org/jira/browse/AXISCPP-363. We have
the provision to select between SOAP 1.1 and SOAP 1.2 in
IHeaderBlock::createStdAttribute().

As an example, one can use:
IHeaderBlock *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.com";);
IAttribute *attr=phb->createStdAttribute(ROLE_NEXT,SOAP_VER_1_2);

However, searching for setSOAPVersion in WSDL tool, I get see that
SOAP_VER_1_1 is always hardcoded into the generated codde. The version
setting is called in each and every method invocation on the stub, so
even if we set it at stub level, it is overidden by the generated
code. Actually, at the moment we do not have an API to select between
soap versions at stub level.

So simply speaking, we only support SOAP 1.1 :-(

Here is the WSDL tool segments where we set SOAP versions:
src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java:
  "\tpCall->_functions->setSOAPVersion(pCall->_object,
SOAP_VER_1_1);\n");
src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java:
      writer.write ("\tm_pCall->setSOAPVersion(SOAP_VER_1_1);\n");
src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java:
 writer.write("\t\tm_pCall->setSOAPVersion(SOAP_VER_1_1);\n");

> createStdAttribute()  uses an undeclared namespace prefix 'env' when 
> SOAP_VER_1_2 is passed as the SOAP_VERSION.
> ----------------------------------------------------------------------------------------------------------------
>
>          Key: AXISCPP-363
>          URL: http://issues.apache.org/jira/browse/AXISCPP-363
>      Project: Axis-C++
>         Type: Bug
>   Components: Client - API
>     Reporter: James Jose
>     Assignee: Samisa Abeysinghe

>
> IHeaderBlock *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.com";);
> IAttribute *attr=phb->createStdAttribute(ROLE_NEXT,SOAP_VER_1_2);
> will create the following SOAP Header.
> <SOAP-ENV:Header><ns2:TestHeader xmlns:ns2="http://axis.com"; 
> env:role="http://www.w3.org/2003/05/soap-envelope                             
> /role/next"></ns2:TestHeader>
> </SOAP-ENV:Header>
> Here the prefix 'env' is an undeclared prefix. Also there is lot of spaces in 
> the value of 'role' attribute.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to