You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by nilesh <ni...@slminfotech.com> on 2004/02/19 15:48:24 UTC

No Deserializer found to deserialize a

hi all,
i am using Apache SOAP to write Javabase soap client. The Java based soap client is talking to .NET based web service. i am getting following error.

Caught SOAPException (SOAP-ENV:Client): No Deserializer found to deserialize a 'http://tempuri.org/:AuthorisePaymentResult' using encoding style 'null'.

i tried to debug the issue using TcpTunnelGUI i am getting below request and response..

******************** REQUEST****************
POST /PaymentAuthorisation/PaymentAuthorisation/PaymentAuthorisation.asmx HTTP/1.0
Host: 192.168.1.7:8081
Content-Type: text/xml;charset=utf-8
Content-Length: 927
SOAPAction: "http://tempuri.org/AuthorisePayment"
Accept-Encoding: gzip
Authorization: Basic YWRtaW5pc3RyYXRvcjpmbGlwLnNpdA==

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ns1:AuthorisePayment xmlns:ns1="http://tempuri.org" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<InputXML xsi:type="xsd:string">&lt;Input_Message&gt;&lt;Operational&gt;&lt;Application_Identification&gt;&lt;AppId&gt;A2G&lt;/AppId&gt;&lt;/Application_Identification&gt;&lt;/Operational&gt;&lt;Data&gt;&lt;Amount&gt;123567.12&lt;/Amount&gt;&lt;CardNumber&gt;12345123451234512345&lt;/CardNumber&gt;&lt;DateExpiry&gt;1104&lt;/DateExpiry&gt;&lt;TxnType&gt;P&lt;/TxnType&gt;&lt;TxnRef&gt;1234567812345678123456781234567812345678123456781234567812345678&lt;/TxnRef&gt;&lt;/Data&gt;&lt;/Input_Message&gt;</InputXML>

</ns1:AuthorisePayment>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


**********************RESPONSE**************

Content-Type: text/xml; charset=utf-8
Content-Length: 881

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><AuthorisePaymentResponse xmlns="http://tempuri.org/"><AuthorisePaymentResult>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Output_Message&gt;&lt;Status_Information&gt;&lt;Status&gt;Error&lt;/Status&gt;&lt;Record_Count&gt;0&lt;/Record_Count&gt;&lt;Error&gt;PaymentAuthorisation.InputValidateXML: 
The 'Operational' element is not declared. An error occurred at file:///C:/Inetpub/wwwroot/PaymentAuthorisation/XmlDefinitions/PaymentAuthorisation_Input.xsd(10, 6).

XMLSchema: PaymentAuthorisation_Input.xsd

InputXML: &lt;/Error&gt;&lt;/Status_Information&gt;&lt;/Output_Message&gt;</AuthorisePaymentResult></AuthorisePaymentResponse></soap:Body></soap:Envelope>


I am getting an error on client side as
Caught SOAPException (SOAP-ENV:Client): No Deserializer found to deserialize a '
http://tempuri.org/:AuthorisePaymentResult' using encoding style 'null'.

please help me out to resolve this issue.

Thx
Nilesh

Re: No Deserializer found to deserialize a

Posted by Scott Nichol <sn...@scottnichol.com>.
You must register a deserializer for the http://tempuri.org/:AuthorisePaymentResult element.  It appears that this element is a string, so you can use the Apache SOAP StringDeserializer class.  If you are not aware of how to do so, the code looks something like this.

    SOAPMappingRegistry smr = new SOAPMappingRegistry();
    StringDeserializer deser = new StringDeserializer();
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,
                 new QName("http://tempuri.org/", "AuthorisePaymentResult"),
                 null, null, deser);
    Call call = new Call();
    call.setSOAPMappingRegistry(smr);

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "nilesh" <ni...@slminfotech.com>
To: <so...@ws.apache.org>
Sent: Thursday, February 19, 2004 9:48 AM
Subject: No Deserializer found to deserialize a 


hi all,
i am using Apache SOAP to write Javabase soap client. The Java based soap client is talking to .NET based web service. i am getting following error.

Caught SOAPException (SOAP-ENV:Client): No Deserializer found to deserialize a 'http://tempuri.org/:AuthorisePaymentResult' using encoding style 'null'.

i tried to debug the issue using TcpTunnelGUI i am getting below request and response..

******************** REQUEST****************
POST /PaymentAuthorisation/PaymentAuthorisation/PaymentAuthorisation.asmx HTTP/1.0
Host: 192.168.1.7:8081
Content-Type: text/xml;charset=utf-8
Content-Length: 927
SOAPAction: "http://tempuri.org/AuthorisePayment"
Accept-Encoding: gzip
Authorization: Basic YWRtaW5pc3RyYXRvcjpmbGlwLnNpdA==

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ns1:AuthorisePayment xmlns:ns1="http://tempuri.org" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<InputXML xsi:type="xsd:string">&lt;Input_Message&gt;&lt;Operational&gt;&lt;Application_Identification&gt;&lt;AppId&gt;A2G&lt;/AppId&gt;&lt;/Application_Identification&gt;&lt;/Operational&gt;&lt;Data&gt;&lt;Amount&gt;123567.12&lt;/Amount&gt;&lt;CardNumber&gt;12345123451234512345&lt;/CardNumber&gt;&lt;DateExpiry&gt;1104&lt;/DateExpiry&gt;&lt;TxnType&gt;P&lt;/TxnType&gt;&lt;TxnRef&gt;1234567812345678123456781234567812345678123456781234567812345678&lt;/TxnRef&gt;&lt;/Data&gt;&lt;/Input_Message&gt;</InputXML>

</ns1:AuthorisePayment>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


**********************RESPONSE**************

Content-Type: text/xml; charset=utf-8
Content-Length: 881

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><AuthorisePaymentResponse xmlns="http://tempuri.org/"><AuthorisePaymentResult>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Output_Message&gt;&lt;Status_Information&gt;&lt;Status&gt;Error&lt;/Status&gt;&lt;Record_Count&gt;0&lt;/Record_Count&gt;&lt;Error&gt;PaymentAuthorisation.InputValidateXML: 
The 'Operational' element is not declared. An error occurred at file:///C:/Inetpub/wwwroot/PaymentAuthorisation/XmlDefinitions/PaymentAuthorisation_Input.xsd(10, 6).

XMLSchema: PaymentAuthorisation_Input.xsd

InputXML: &lt;/Error&gt;&lt;/Status_Information&gt;&lt;/Output_Message&gt;</AuthorisePaymentResult></AuthorisePaymentResponse></soap:Body></soap:Envelope>


I am getting an error on client side as
Caught SOAPException (SOAP-ENV:Client): No Deserializer found to deserialize a '
http://tempuri.org/:AuthorisePaymentResult' using encoding style 'null'.

please help me out to resolve this issue.

Thx
Nilesh