axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nadir Amra <a...@us.ibm.com>
Subject Re: Segmentation fault during deserialization
Date Tue, 11 Dec 2007 10:18:20 GMT
It is good the you posted response, but need WSDL to fully debug problem. 
I would also suggest that you build the code from SVN since lots of fixes 
have been put there.

Nadir K. Amra


"Nellanat, Arun" <anellanat@sonusnet.com> wrote on 12/11/2007 03:23:46 AM:

> Hi,
>   I built a WebService client in C++ from stub emitted by the Axis
> WSDL2Ws tool. However, when receiving the response from the Webservice,
> the application aborts due to a Segmentation Fault.
>   The fault takes place when deserializing the SOAP response. The SOAP
> response is given below:
> 
> <?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:callSetupResponse
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns1="http://www.abc.com/XXService/">
>       <callSetupResponse href="#id0"/>
>    </ns1:callSetupResponse>
>    <multiRef id="id0" soapenc:root="0"
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xsi:type="ns2:CallSetupResponseType"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns2="http://www.abc.com/XXService/">
>       <MaxDuration xsi:type="xsd:int">120</MaxDuration>
>       <WhisperingSecs xsi:type="xsd:int">100</WhisperingSecs>
>       <Criticality xsi:type="xsd:int">3</Criticality>
>    </multiRef>
>   </soapenv:Body>
> </soapenv:Envelope>
> 
> 
> On debugging, the 2nd line of the following method (emitted by WSDL2Ws)
> was found to be causing the segmentation fault:
> 
> /*
>  * This static method deserialize a CallSetupResponseType type of object
>  */
> int Axis_DeSerialize_CallSetupResponseType(CallSetupResponseType* param,
> IWrapperSoapDeSerializer* pIWSDZ)
> {
>    xsd__int* p_MaxDuration =
> (pIWSDZ->getElementAsInt("MaxDuration",0));
>    /*
>        * NOTE: p_MaxDuration value receives a value 0 (NULL). That's why
> the     * line below gives a segmentation fault. 
>     */ 
>    param->MaxDuration = *p_MaxDuration; 
>    delete p_MaxDuration;
>    xsd__int* p_WhisperingSecs = 
>       (pIWSDZ->getElementAsInt("WhisperingSecs",0));
>    param->WhisperingSecs = *p_WhisperingSecs;
>    delete p_WhisperingSecs;
>    xsd__int* p_Criticality =
> (pIWSDZ->getElementAsInt("Criticality",0));
>    param->Criticality = *p_Criticality;
>    delete p_Criticality;
>    return pIWSDZ->getStatus();
> }
> 
> Why is it that the MaxDuration value "120" cannot be deserialized to an
> int? What could be going wrong? 
> 
> Can someone please help me about this?
> 
> Thanks in advance,
> Arun
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message