Hi,

I just started using Axis C++, so I hope I am doing something stupid.
I am using wsdl2ws to generate the client stub code for a webservice.
That seems to work OK, I can compile and link and start everything.
Except that the server refuses to understand the soap messages
that I generate.  I tried to find an answer in the documentation,
but either it's not there, or I am looking in the wrong place.

The SOAP messages that is generated by AxisCPP uses the wrong
name for a complex parameter of the Soap call (According to 
the server).  Below are the relevant (I think) parts of the WSDL, 
the  SOAP messages that gets generated by AxisCPP and the Soap 
message that is expected by the server.

After browsing through the sources I found that call to put the 
parameter in the message is:

        m_pCall->addCmplxParameter( Value2,
                (void *) Axis_Serialize_WOnSoapClientIdentification,
                (void *) Axis_Delete_WOnSoapClientIdentification,
                "clientID",
                Axis_URI_WOnSoapClientIdentification);

Here the name "clientID" is passed, this is the name of the 
parameter.  However the function 
        Axis_Serialize_WOnSoapClientIdentification
is used for the actual serialization. This function actually
uses the tag:

        Axis_TypeName_WOnSoapClientIdentification

So the name of the type instead of the parameter name.

Is there anything I can do to change this behavior?


Thanks,



Rob Lievaart.

--WSDL-Parts--

        <types>
                <schema targetNamespace="urn:wonsoapnamespace" 
                    elementFormDefault="qualified" 
                    xmlns="http://www.w3.org/2001/XMLSchema"; 
                    xmlns:ns="urn:wonsoapnamespace" 
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

                        <complexType name="WOnSoapClientIdentification">
                                <sequence>
                                        <element name="user"
minOccurs="1" maxOccurs="1" type="xsd:string"/>
                                        <element name="password"
minOccurs="1" maxOccurs="1" type="xsd:string"/>
                                        <element name="departmentId"
minOccurs="0" maxOccurs="1" type="xsd:string"/>
                                </sequence>
                        </complexType>

                        <!-- snipped other types -->
        </types>

        <!-- snipped other messages -->
        
        <message name="GetPlanningInformationRequest">
                <part name="clientID"
type="ns:WOnSoapClientIdentification"/>
                <part name="date" type="xsd:date"/>
                <part name="channel" type="xsd:string"/>
        </message>

        <!-- snipped other messages -->

        <portType name="WOnSoapInterface">
                <!-- snipped other operations -->
                <operation name="GetPlanningInformation">
                        <documentation>returns the planning information
encoded as xml</documentation>
                        <input
message="ns:GetPlanningInformationRequest"/>
                        <output
message="ns:GetPlanningInformationResponse"/>
                </operation>
                <!-- snipped other operations -->
        </portType>



        <binding name="WOnSoapInterface" type="ns:WOnSoapInterface">
                <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http/"/>
                <!-- snip -->
                <operation name="GetPlanningInformation">
                        <soap:operation soapAction=""/>
                        <input>
                                <soap:body use="literal"
namespace="urn:wonsoapnamespace"/>
                        </input>
                        <output>
                                <soap:body use="literal"
namespace="urn:wonsoapnamespace"/>
                        </output>
                </operation>
                <!-- snip -->
        </binding>

        <service name="WOnSoapInterface">
                <port name="WOnSoapInterface"
binding="ns:WOnSoapInterface">
                        <soap:address location=""/>
                </port>
        </service>

---Axis-Generated-SOAP-request----

<ns1:GetPlanningInformation 
        xmlns:ns1="urn:wonsoapnamespace">
        <date xsi:type="xsd:date">2007-02-19+01:00</date>
        <channel xsi:type="xsd:string">NED1</channel>
        <WOnSoapClientIdentification
xsi:type="ns1:WOnSoapClientIdentification">
                <user xsi:type="xsd:string">publiek</user>
                <password xsi:type="xsd:string">bestel</password>
                <departmentId xsi:nil="true"></departmentId>
        </WOnSoapClientIdentification>
        </ns1:GetPlanningInformation>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


---Expected-SOAP-request---------


<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; 
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

                   xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
                   xmlns:won="urn:wonsoapnamespace">
        <SOAP-ENV:Body>
                <won:GetPlanningInformation>
                        <clientID
xsi:type="won:WOnSoapClientIdentification">
                                <user
xsi:type="xsd:string">publiek</won:user>
                                <password
xsi:type="xsd:string">bestel</won:password>
                        </clientID>
                        <date xsi:type="xsd:date">2007-02-14</date>
                        <channel xsi:type="xsd:string">NED1</channel>
                </won:GetPlanningInformation>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to