axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <samisa.abeysin...@gmail.com>
Subject Re: AxisException 72: Cannot deserialize the requested element
Date Wed, 14 Dec 2005 01:43:34 GMT
Obviously the problem is in the use of "Gestor.testResponse" by the 
generated code to validate the message.
The response just have "testResponse" not "Gestor.testResponse".

The WSDL has "Gestor.testResponse", may be this is a bug in generated 
code, the "Gestor." needs to be stripped off. Or may be it  is a server 
side problem, "Gestor." needs to be included. You should be able to get 
it working by editing the generated code to:
if(AXIS_SUCCESS == m_pCall->checkMessage("testResponse", 
"http://bsg.com.ar/gestor/wsdl/ <http://bsg.com.ar/gestor/wsdl/>").

BTW: What is your server side, Axis C++?

Thanks,
Samisa...

Martin Mirad wrote:

> Hi, I'm trying to get the response from the server but the axis call 
> fail when invoke this line from the stub generated by the WSDL2Ws tool:
>
> if(AXIS_SUCCESS == m_pCall->checkMessage("Gestor.testResponse", 
> "http://bsg.com.ar/gestor/wsdl/ <http://bsg.com.ar/gestor/wsdl/>")
>
> I'm invoking the "test" method from the WSDL file. Although, I'm 
> tracing the route of both messages, request and response, and the 
> server is responding.  Here are the messages.
>
> Request SOAP message :
> ============================================================
> POST /gestor/services/urn:ServiceRequestHandler HTTP/1.1
> Host: 127.0.0.1:1234 <http://127.0.0.1:1234>
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "urn:ServiceRequestHandler"
> Content-Length: 431
>  
> <?xml version='1.0' encoding='utf-8' ?>
> <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:Body>
> <ns1:test xmlns:ns1="http://bsg.com.ar/gestor/wsdl/">
> <param1 xsi:type="xsd:string">param1</param1>
> <param2 xsi:type="xsd:string">param2</param2>
> </ns1:test>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> ============================================================
>
> Response
> ============================================================
> HTTP/1.1 200 OK
> Content-Type: text/xml;charset=utf-8
> Transfer-Encoding: chunked
> Date: Tue, 13 Dec 2005 19:36:29 GMT
> Server: Apache-Coyote/1.1
>  
> <?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">
>  <soapenv:Body>
>   <ns1:testResponse 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
> xmlns:ns1="http://bsg.com.ar/gestor/wsdl/">
>    <ns1:testReturn xsi:type="xsd:string">param1param2</ns1:testReturn>
>   </ns1:testResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> ============================================================
>
> And here is the WSDL file:
>
> ============================================================
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions    name="Gestor"
>                                 
> targetNamespace="http://bsg.com.ar/gestor/wsdl/"
>                                 
> xmlns:wsdlns="http://bsg.com.ar/gestor/wsdl/"
>                                 xmlns:typens="http://bsg.com.ar"
>                 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>                                 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>                                 
> xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extension"
>                 
> xmlns:dime='http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/'
>                 
> xmlns:ref='http://schemas.xmlsoap.org/ws/2002/04/reference/'
>                 
> xmlns:content='http://schemas.xmlsoap.org/ws/2002/04/content-type/'
>                                 
> xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
>                                 xmlns='http://schemas.xmlsoap.org/wsdl/'>
>
>     
> <!--***********************************************************************************************************-->
>     <!--                                                
> TYPES                                                      -->
>     
> <!--***********************************************************************************************************-->
>         <types>
>                 <schema targetNamespace="http://bsg.com.ar"
>                                 xmlns="http://www.w3.org/2001/XMLSchema"
>                                 
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>                                 
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>                                 elementFormDefault="qualified">
>
>                         <!-- KeyValuePair -->
>                         <xsd:complexType name="KeyValuePair">
>                                 <xsd:sequence>
>                                         <xsd:element name='key' 
> type='xsd:string'/>
>                                         <xsd:element name='value' 
> type='xsd:string'/>
>                                 </xsd:sequence>
>                         </xsd:complexType>
>
>                         <!-- Params array -->
>                         <xsd:complexType name="params">
>                                 <complexContent>
>                                         <restriction 
> base="SOAP-ENC:Array">
>                                                 <xsd:sequence>
>                                                         <xsd:element 
> maxOccurs="unbounded"
>                                                                          
> minOccurs="0"
>                                                                          
> name="item"
>                                                                          
> type="typens:KeyValuePair"/>
>                                                 </xsd:sequence>
>                                                 <attribute 
> ref="SOAP-ENC:arrayType" wsdl:arrayType="typens:KeyValuePair[]"/>
>                                         </restriction>
>                                 </complexContent>
>                         </xsd:complexType>
>
>                         <!-- ExecutionControls -->
>                         <xsd:complexType name="ExecutionControls">
>                                 <xsd:sequence>
>                                         <xsd:element 
> name='serverTimeout' type='xsd:string'/>
>                                         <xsd:element name='maxRows' 
> type='xsd:string'/>
>                                         <xsd:element 
> name='onlineRequired' type='xsd:string'/>
>                                         <xsd:element 
> name='forwardable' type='xsd:string'/>
>                     <xsd:element name='clientKey1' type='xsd:string'/>
>                                         <xsd:element name='clientKey2' 
> type='xsd:string'/>
>                                         <xsd:element name='clientKey3' 
> type='xsd:string'/>
>                                 </xsd:sequence>
>                         </xsd:complexType>
>
>                         <!-- Status -->
>                         <xsd:complexType name="Status">
>                                 <xsd:sequence>
>                                         <xsd:element name='code' 
> type='xsd:int'/>
>                                         <xsd:element name='status' 
> type='xsd:string'/>
>                                         <xsd:element name='message' 
> type='xsd:string'/>
>                                         <xsd:element 
> name='backendCode' type='xsd:int'/>
>                                         <xsd:element 
> name='backendMessage' type='xsd:string'/>
>                                         <xsd:element 
> name='backendOnline' type='xsd:boolean'/>
>                                 </xsd:sequence>
>                         </xsd:complexType>
>
>                         <!-- FieldDefinition -->
>                         <xsd:complexType name="FieldDefinition">
>                                 <xsd:sequence>
>                                         <xsd:element name='name' 
> type='xsd:string'/>
>                                         <xsd:element name='type' 
> type='xsd:string'/>
>                                 </xsd:sequence>
>                         </xsd:complexType>
>
>                         <!-- field -->
>                         <xsd:complexType name="field">
>                                 <xsd:sequence>
>                                         <xsd:element name='name' 
> type='xsd:string'/>
>                                         <xsd:element name='value' 
> type='xsd:string'/>
>                                 </xsd:sequence>
>                         </xsd:complexType>
>
>                         <!-- Table -->
>                         <xsd:complexType name="Table">
>                                 <xsd:sequence>
>                                         <xsd:element name='name' 
> type='xsd:string'/>
>                                         <xsd:element name='fields' 
> type='xsd:string'/>
>                                         <xsd:element name='rows' 
> type='xsd:string'/>
>                                 </xsd:sequence>
>                         </xsd:complexType>
>
>                         <!-- TrxResultSet -->
>                         <xsd:complexType name="TrxResultSet">
>                                 <xsd:sequence>
>                                         <xsd:element name='name' 
> type='xsd:string'/>
>                                         <xsd:element name='id' 
> type='xsd:string'/>
>                                         <xsd:element name='tables' 
> type='xsd:string'/>
>                                         <xsd:element 
> name='iteratorSize' type='xsd:int'/>
>                                 </xsd:sequence>
>                         </xsd:complexType>
>
>                         <!-- TrxResponse -->
>                         <xsd:complexType name="TrxResponse">
>                                 <xsd:sequence>
>                                         <xsd:element name='status' 
> type='typens:Status'/>
>                                         <xsd:element name='maxRows' 
> type='xsd:int'/>
>                                         <xsd:element name='resultSet' 
> type='typens:TrxResultSet'/>
>                                         <xsd:element 
> name='limitedRows' type='xsd:boolean'/>
>                                 </xsd:sequence>
>                         </xsd:complexType>
>
>                 </schema>
>         </types>
>
>
>     
> <!--***********************************************************************************************************-->
>     <!--                                                
> MESSAGES                                                   -->
>     
> <!--***********************************************************************************************************-->
>         <!-- login -->
>         <message name="Gestor.login">
>                 <part name="user" type="xsd:string"/>
>                 <part name="passwd" type="xsd:string"/>
>         </message>
>
>     <message name="Gestor.loginResponse">
>                 <part name="return" type="typens:Status"/>
>         </message>
>
>         <!-- logoff -->
>         <message name="Gestor.logoff"/>
>         <message name="Gestor.logoffResponse">
>                 <part name="return" type="typens:Status"/>
>         </message>
>
>         <!-- handle -->
>         <message name="Gestor.handle">
>                 <part name="trxDefId" type="xsd:string"/>
>                 <part name="params" type="typens:params"/>
>                 <part name="controls" type="typens:ExecutionControls"/>
>         </message>
>
>     <message name="Gestor.handleResponse">
>                 <part name="return" type="typens:TrxResponse"/>
>         </message>
>
>         <!-- handleSingleTrx -->
>         <message name="Gestor.handleSingleTrx">
>                 <part name="user" type="xsd:string"/>
>                 <part name="passwd" type="xsd:string"/>
>                 <part name="trxDefId" type="xsd:string"/>
>                 <part name="params" type="typens:params"/>
>                 <part name="controls" type="typens:ExecutionControls"/>
>         </message>
>
>     <message name="Gestor.test">
>         <part name="param1" type="xsd:string"/>
>         <part name="param2" type="xsd:string"/>
>     </message>
>
>     <message name="Gestor.testResponse">
>         <part name="return" type="xsd:string"/>
>     </message>
>
>     
> <!--***********************************************************************************************************-->
>     <!--                                                
> OPERATIONS                                                 -->
>     
> <!--***********************************************************************************************************-->
>         <portType name="GestorSoapPortType">
>
>                 <!-- login -->
>                 <operation name="login" parameterOrder="user passwd">
>                         <input message="wsdlns:Gestor.login"/>
>                         <output message="wsdlns:Gestor.loginResponse"/>
>                 </operation>
>
>                 <!-- logoff -->
>                 <operation name="logoff">
>                         <input message="wsdlns:Gestor.logoff"/>
>                         <output message="wsdlns:Gestor.logoffResponse"/>
>                 </operation>
>
>                 <!-- handle -->
>                 <operation name="handle" parameterOrder="trxDefId 
> params controls">
>                         <input message="wsdlns:Gestor.handle"/>
>                         <output message="wsdlns:Gestor.handleResponse"/>
>                 </operation>
>
>                 <!-- handleSingleTrx -->
>                 <operation name="handleSingleTrx" parameterOrder="user 
> passwd trxDefId params controls">
>                         <input message="wsdlns:Gestor.handleSingleTrx"/>
>                         <output message="wsdlns:Gestor.handleResponse"/>
>                 </operation>
>
>         <!--test-->
>         <operation name="test" parameterOrder="param1 param2">
>             <input message="wsdlns:Gestor.test"/>
>             <output message="wsdlns:Gestor.testResponse"/>
>         </operation>
>
>     </portType>
>
>
>     
> <!--***********************************************************************************************************-->
>     <!--                                                
> BINDINGS                                                   -->
>     
> <!--***********************************************************************************************************-->
>         <binding name="GestorBinding" type="wsdlns:GestorSoapPortType">
>                 <stk:binding preferredEncoding="UTF-8"/>
>                 <soap:binding style="rpc" 
> transport="http://schemas.xmlsoap.org/soap/http"/ 
> <http://schemas.xmlsoap.org/soap/http%22/>>
>
>                 <!-- login -->
>                 <operation name="login">
>                         <soap:operation 
> soapAction="urn:ServiceRequestHandler"/>
>
>                         <input>
>                                 <soap:body      use="encoded"
>                                                         
> namespace="urn:ServiceRequestHandler"
>                                                         
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>                                                         parts='user 
> passwd'/>
>                         </input>
>                         <output>
>                                 <soap:body      use="encoded"
>                                                         
> namespace="urn:ServiceRequestHandler"
>                                                         
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>                                                         parts='return'/>
>                         </output>
>                 </operation>
>
>                 <!-- logoff -->
>                 <operation name="logoff">
>                         <soap:operation 
> soapAction="urn:ServiceRequestHandler"/>
>
>                         <input>
>                                 <soap:body      use="encoded"
>                                                         
> namespace="urn:ServiceRequestHandler"
>                                                         
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/ 
> <http://schemas.xmlsoap.org/soap/encoding/%22/>>
>                         </input>
>                         <output>
>                                 <soap:body      use="encoded"
>                                                         
> namespace="urn:ServiceRequestHandler"
>                                                         
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>                                                         parts='return'/>
>                         </output>
>                 </operation>
>
>                 <!-- handle -->
>                 <operation name="handle">
>                         <soap:operation 
> soapAction="urn:ServiceRequestHandler"/>
>
>                         <input>
>                                 <soap:body      use="encoded"
>                                                         
> namespace="urn:ServiceRequestHandler"
>                                                         
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>                                                         
> parts='trxDefId params controls'/>
>                         </input>
>                         <output>
>                 <dime:message 
> layout='http://schemas.xmlsoap.org/ws/2002/04/dime/open-layout'
>                               wsdl:required='true' />
>                                 <soap:body      use="encoded"
>                                                         
> namespace="urn:ServiceRequestHandler"
>                                                         
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>                                                         parts='return'/>
>                         </output>
>                 </operation>
>
>                 <!-- handleSingleTrx -->
>                 <operation name="handleSingleTrx">
>                         <soap:operation 
> soapAction="urn:ServiceRequestHandler"/>
>
>                         <input>
>                                 <soap:body      use="encoded"
>                                                         
> namespace="urn:ServiceRequestHandler"
>                                                         
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>                                                         parts='user 
> passwd trxDefId params controls'/>
>                         </input>
>                         <output>
>                 <dime:message 
> layout='http://schemas.xmlsoap.org/ws/2002/04/dime/open-layout'
>                               wsdl:required='true' />
>                                 <soap:body      use="encoded"
>                                                         
> namespace="urn:ServiceRequestHandler"
>                                                         
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>                                                         parts='return'/>
>                         </output>
>                 </operation>
>
>
>         <!-- test -->
>         <operation name="test">
>             <soap:operation soapAction="urn:ServiceRequestHandler"/>
>
>             <input>
>                 <soap:body      use="encoded"
>                             namespace="urn:ServiceRequestHandler"
>                             
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/ 
> <http://schemas.xmlsoap.org/soap/encoding/%22/>>
>             </input>
>             <output>
>                 <soap:body      use="encoded"
>                             namespace="urn:ServiceRequestHandler"
>                             
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>                             parts='return'/>
>             </output>
>         </operation>
>
>
>     </binding>
>
>
>         
> <!--***********************************************************************************************************-->
>         <!--                                                    SERVICE-->
>         
> <!--***********************************************************************************************************-->
>         <service name="Gestor">
>                 <port name="GestorSoapPort" 
> binding="wsdlns:GestorBinding">
>                         <soap:address 
> location="http://desarr106pc:1234/gestor/services/urn:ServiceRequestHandler"/ 
> <http://desarr106pc:1234/gestor/services/urn:ServiceRequestHandler%22/>>
>                 </port>
>         </service>
>
> </definitions>
> ===========================================================
>
> Please, If anybody can help me it will be very helpful.
>
> Thanks,
>
> __
> Martin Mirad
>
>
>
>


Mime
View raw message