You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Adrian Dick <ad...@uk.ibm.com> on 2006/11/16 16:58:47 UTC
Re: Axis C++ WebService Messages calls with Complex Types and Arrays
throws Exception: m_iExceptionCode=72 m_sMessage=0x00a50580 "Cannot
deserialize the requested element"
Hi,
It would aid diagnosing your deserialization problem if you could capture
the SOAP request/response messages.
Regards,
Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)
G Sabarinath <r1...@in.ibm.com> wrote on 16/11/2006 14:38:26:
> Hi,
> I am able to develop , run, and use WebServices in Axis C++ having simple
> Types (int, string etc) as message arguments .
> Howerver when I use complex Types with Arrays as message arguments it I
> am getting the following Exception.
> <m_iExceptionCode=72 m_sMessage=0x00a50580 "Cannot deserialize the
> requested element ">
>
> Details of the WSDL and code are given below:
>
> CompleType schema in my WSDL:( start)
> ------------------------------------------------------------
> <xsd:schema targetNamespace=
"http://localhost:9999/axis/BinOptNewService"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <element name="BinElement" type="tns:BinInfoType"> </element>
> <complexType name="BinInfoType">
> <sequence>
> <element name="BinName" type="string" > </element>
> <element name="BinID" type="string" > </element>
> <element name="Param" type ="tns:ParamType" minOccurs="0"
> maxOccurs="unbounded"> </element>
> </sequence>
> </complexType>
> <complexType name ="ParamType">
> <sequence>
> <element name="ParamName"
> type="string" minOccurs="1" maxOccurs="1">
> </element>
> <element name="ParamValue"
> type="double" minOccurs="1" maxOccurs="1">
> </element>
> </sequence>
> </complexType>
> </xsd:schema>
> CompleType schema in my WSDL: (end.)
>
> WASDL Extracts associated with message "addBinTemplate":
>
-----------------------------------------------------------------------------------------
> ----------
> -----------
> <wsdl:message name="addBinTemplateRequest">
> <wsdl:part name= "binTmpl" type="tns:BinInfoType"/>
> <wsdl:part name= "solutionName" type="xsd:string"/>
> ------
> --------
> --------
> <wsdl:binding name="BinOptNewServiceSoapBinding" type="
> intf:BinOptNewService">
> <wsdlsoap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="addBinTemplate">
> <wsdlsoap:operation soapAction="BinOptNewService#addBinTemplate"/>
> <wsdl:input name="addBinTemplateRequest">
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:9999/axis/BinOptNewService"
> use="encoded"/>
> </wsdl:input>
> <wsdl:output name="addBinTemplateResponse">
> <wsdlsoap:body encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:9999/axis/BinOptNewService"
> use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> ------------
> ----------------
> WSDL2Ws generated classes:
> ----------------------------------------------
>
> class BinInfoType
> {
> public:
> xsd__string BinName;
> xsd__string BinID;
> ParamType_Array * Param;
>
> xsd__string getBinName();
> void setBinName(xsd__string InValue);
>
> xsd__string getBinID();
> void setBinID(xsd__string InValue);
>
> ParamType_Array * getParam();
> void setParam(ParamType_Array * pInValue);
>
> BinInfoType();
> void reset();
> virtual ~BinInfoType();
> };
>
> class ParamType
> {
> public:
> xsd__string ParamName;
> xsd__double ParamValue;
>
> xsd__string getParamName();
> void setParamName(xsd__string InValue);
>
> xsd__double getParamValue();
> void setParamValue(xsd__double InValue);
>
> ParamType();
> void reset();
> virtual ~ParamType();
> };
>
> class STORAGE_CLASS_INFO ParamType_Array : public Axis_Array
> {
> public:
> ParamType_Array();
> ParamType_Array(const ParamType_Array & original);
> virtual ~ParamType_Array();
> void set( class ParamType** array, const int size);
> class ParamType** get(int & size) const;
> void clone(const ParamType_Array & original);
> virtual Axis_Array * clone() const;
> void clear();
> };
>
>
> Client code:
> -----------------
>
> BinOptNewService bop;
> BinInfoType *bot = new BinInfoType();
> ParamType **pm = new ParamType*[2];
> ParamType_Array *pmA = new ParamType_Array();
>
> pm[0] = new ParamType();
> pm[1] = new ParamType();
> pm[0]->setParamName("P1");
> pm[0]->setParamValue(100.0);
> pm[1]->setParamName("P2");
> pm[1]->setParamValue(200.0);
>
> pmA->set(pm, 2);
> bot->setParam(pmA);
> bot->setBinID("111");
> bot->setBinName("MyBin");
> int Result1 = bop.addBinTemplate("Bin", bot); // This call thows
> m_iExceptionCode=72 m_sMessage=0x00a50580 "Cannot deserialize the
requested
> element "
>
> Other messages in the Same WebService having simple type arguments work
> fine!!
>
> Thnaks & Regards
> G Sabarinath
> IBM Global Services India Ltd.
> Bangalore.
> Contact : 91-98450-74838 (Cell)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: Axis C++ WebService Messages calls with Complex Types and Arrays
throws Exception: m_iExceptionCode=72 m_sMessage=0x00a50580 "Cannot
deserialize the requested element"
Posted by G Sabarinath <r1...@in.ibm.com>.
Hi Adrian,
Pls see the SOAP request message from the AxisLog1.txt Log file
(attached)..
Message returns a single interger value.
SOAP request message:
---------------------------------
[17/11/2006 12:22:14:682 India Standard Time] 2556 HTTPChannel < operator<<
@0033B278,[60613C00] <`a<.>
[17/11/2006 12:22:14:682 India Standard Time] 2556 HTTPChannel > operator<<
@0033B278,------------>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I "<?xml version='1.0'
encoding='utf-8' ?>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I <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">
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I <SOAP-ENV:Body>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I <ns1:addBinTemplate
xmlns:ns1="http://localhost:9999/axis/BinOptNewService">
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I <solutionName
xsi:type="xsd:string">Bin</solutionName>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I <BinInfoType
xsi:type="ns1:BinInfoType"><BinName xsi:type="xsd:string">MyBin</BinName>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I <BinID
xsi:type="xsd:string">111</BinID>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I <ns1:ParamArray
xmlns:ns1="" xmlns:enc="http://www.w3.org/2001/06/soap-encoding"
xmlns:ns1="http://localhost:9999/axis/BinOptNewService"
enc:arrayType="ns1:Param[2]">
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I
<ParamType><ParamName xsi:type="xsd:string">P1</ParamName>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I <ParamValue
xsi:type="xsd:string">100.0</ParamValue>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I
</ParamType><ParamType><ParamName xsi:type="xsd:string">P2</ParamName>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I <ParamValue
xsi:type="xsd:string">200.0</ParamValue>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I
</ParamType></ns1:ParamArray>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I
</BinInfoType></ns1:addBinTemplate>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I </SOAP-ENV:Body>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I </SOAP-ENV:Envelope>
[17/11/2006 12:22:14:682 India Standard Time] 2556 - I "
(See attached file: AxisLog.zip)(See attached file: AxisLog1.zip)(See
attached file: BinOptNewService.zip)
Associated schema definition from WSDL file (attached) (minor
modification from what I sent yesterday).
-----------------------------------------------------------------------------------------------------------------------------------
<xsd:schema targetNamespace= "http://localhost:9999/axis/BinOptNewService"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="BinElement" type="tns:BinInfoType"> </element>
<complexType name="BinInfoType">
<sequence>
<element name="BinName" type="string" > </element>
<element name="BinID" type="string" > </element>
<element name="Param" type ="tns:ParamType" minOccurs="0
" maxOccurs="unbounded"> </element>
</sequence>
</complexType>
<complexType name ="ParamType">
<xsd:all>
<element name="ParamName" type="string"> </element>
<element name="ParamValue" type="string"> </element>
</xsd:all>
</complexType>
</xsd:schema>
G Sabarinath
IBM Global Services India Ltd.
Bangalore.
Contact : 91-98450-74838 (Cell)
Adrian Dick
<adrian.dick@uk.i
bm.com> To
"Apache AXIS C User List"
16/11/2006 21:28 <ax...@ws.apache.org>
cc
Please respond to Subject
"Apache AXIS C Re: Axis C++ WebService Messages
User List" calls with Complex Types and Arrays
throws Exception:
m_iExceptionCode=72
m_sMessage=0x00a50580 "Cannot
deserialize the requested element"
Hi,
It would aid diagnosing your deserialization problem if you could capture
the SOAP request/response messages.
Regards,
Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)
G Sabarinath <r1...@in.ibm.com> wrote on 16/11/2006 14:38:26:
> Hi,
> I am able to develop , run, and use WebServices in Axis C++ having simple
> Types (int, string etc) as message arguments .
> Howerver when I use complex Types with Arrays as message arguments it I
> am getting the following Exception.
> <m_iExceptionCode=72 m_sMessage=0x00a50580 "Cannot deserialize the
> requested element ">
>
> Details of the WSDL and code are given below:
>
> CompleType schema in my WSDL:( start)
> ------------------------------------------------------------
> <xsd:schema targetNamespace=
"http://localhost:9999/axis/BinOptNewService"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <element name="BinElement" type="tns:BinInfoType"> </element>
> <complexType name="BinInfoType">
> <sequence>
> <element name="BinName" type="string" > </element>
> <element name="BinID" type="string" > </element>
> <element name="Param" type ="tns:ParamType" minOccurs="0"
> maxOccurs="unbounded"> </element>
> </sequence>
> </complexType>
> <complexType name ="ParamType">
> <sequence>
> <element name="ParamName"
> type="string" minOccurs="1" maxOccurs="1">
> </element>
> <element name="ParamValue"
> type="double" minOccurs="1" maxOccurs="1">
> </element>
> </sequence>
> </complexType>
> </xsd:schema>
> CompleType schema in my WSDL: (end.)
>
> WASDL Extracts associated with message "addBinTemplate":
>
-----------------------------------------------------------------------------------------
> ----------
> -----------
> <wsdl:message name="addBinTemplateRequest">
> <wsdl:part name= "binTmpl" type="tns:BinInfoType"/>
> <wsdl:part name= "solutionName" type="xsd:string"/>
> ------
> --------
> --------
> <wsdl:binding name="BinOptNewServiceSoapBinding" type="
> intf:BinOptNewService">
> <wsdlsoap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="addBinTemplate">
> <wsdlsoap:operation soapAction="BinOptNewService#addBinTemplate"/>
> <wsdl:input name="addBinTemplateRequest">
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:9999/axis/BinOptNewService"
> use="encoded"/>
> </wsdl:input>
> <wsdl:output name="addBinTemplateResponse">
> <wsdlsoap:body encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:9999/axis/BinOptNewService"
> use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> ------------
> ----------------
> WSDL2Ws generated classes:
> ----------------------------------------------
>
> class BinInfoType
> {
> public:
> xsd__string BinName;
> xsd__string BinID;
> ParamType_Array * Param;
>
> xsd__string getBinName();
> void setBinName(xsd__string InValue);
>
> xsd__string getBinID();
> void setBinID(xsd__string InValue);
>
> ParamType_Array * getParam();
> void setParam(ParamType_Array * pInValue);
>
> BinInfoType();
> void reset();
> virtual ~BinInfoType();
> };
>
> class ParamType
> {
> public:
> xsd__string ParamName;
> xsd__double ParamValue;
>
> xsd__string getParamName();
> void setParamName(xsd__string InValue);
>
> xsd__double getParamValue();
> void setParamValue(xsd__double InValue);
>
> ParamType();
> void reset();
> virtual ~ParamType();
> };
>
> class STORAGE_CLASS_INFO ParamType_Array : public Axis_Array
> {
> public:
> ParamType_Array();
> ParamType_Array(const ParamType_Array & original);
> virtual ~ParamType_Array();
> void set( class ParamType** array, const int size);
> class ParamType** get(int & size) const;
> void clone(const ParamType_Array & original);
> virtual Axis_Array * clone() const;
> void clear();
> };
>
>
> Client code:
> -----------------
>
> BinOptNewService bop;
> BinInfoType *bot = new BinInfoType();
> ParamType **pm = new ParamType*[2];
> ParamType_Array *pmA = new ParamType_Array();
>
> pm[0] = new ParamType();
> pm[1] = new ParamType();
> pm[0]->setParamName("P1");
> pm[0]->setParamValue(100.0);
> pm[1]->setParamName("P2");
> pm[1]->setParamValue(200.0);
>
> pmA->set(pm, 2);
> bot->setParam(pmA);
> bot->setBinID("111");
> bot->setBinName("MyBin");
> int Result1 = bop.addBinTemplate("Bin", bot); // This call thows
> m_iExceptionCode=72 m_sMessage=0x00a50580 "Cannot deserialize the
requested
> element "
>
> Other messages in the Same WebService having simple type arguments work
> fine!!
>
> Thnaks & Regards
> G Sabarinath
> IBM Global Services India Ltd.
> Bangalore.
> Contact : 91-98450-74838 (Cell)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org