Error deserializing response message body to work

I am having a problem communicating with a SOAP Axis web service using the Service Reference method with dotNet.

It seems that when the dotNet client deserializes the incoming xml stream, it expects an array, but it actually receives a single object. I thought there might be a problem with the xml message sent from the web service, but it looks ok.

Error message:

Cannot assign object of type WebService.MessagingServices_SendMultiSMS_SendSuccess to an object of type WebService.MessagingServices_SendMultiSMS_SendSuccess[]. The error occurred while reading node with id='id1'.

      

XML SOAP message:

<?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:sendMultiSMSResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://DefaultNamespace"><sendMultiSMSReturn href="#id0"/></ns1:sendMultiSMSResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:MessagingServices_SendMultiSMSResult" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn"><CallSuccess xsi:type="xsd:boolean">true</CallSuccess><CallErrorMessage xsi:type="xsd:string">Success</CallErrorMessage><SMSCount xsi:type="xsd:int">2</SMSCount><MultiSMSPostedList href="#id1"/><MultiSMSPostedList href="#id2"/></multiRef><multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:MessagingServices_SendMultiSMS_SendSuccess" xmlns:ns3="urn" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><gRecipientName xsi:type="xsd:string">Me</gRecipientName><gRecipientMSISDNwithCC xsi:type="xsd:string">xxxxxx1</gRecipientMSISDNwithCC><gOutMsgID xsi:type="xsd:int">314437688</gOutMsgID></multiRef><multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:MessagingServices_SendMultiSMS_SendSuccess" xmlns:ns4="urn" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><gRecipientName xsi:type="xsd:string">Me</gRecipientName><gRecipientMSISDNwithCC xsi:type="xsd:string">xxxxxx2</gRecipientMSISDNwithCC><gOutMsgID xsi:type="xsd:int">314437687</gOutMsgID></multiRef></soapenv:Body></soapenv:Envelope>

      

+3
soap .net serialization axis


source to share


No one has answered this question yet

Check out similar questions:

872
Deserialize JSON to dynamic C # object?
3
Using HTTP POST (www-form-encoded) for ASP.NET ASMX with soap authentication
1
SOAP response / request, how to convert it to PHP
1
WebService (SOAP) - remove protocol suffix in wsdl file
1
Java Generate Soap Envelop Message with same element name with different type
1
Deserialization error in new environment
1
C # + Magento API V2: content type / xml text; encoding = UTF-8, text / XML; charset = UTF-8 response message does not match
0
Problem with ASMX WebServices
0
How to deploy to SOAP namespaces using SimpleXML and PHP
0
Using SOAP to access web services - soapclient () deprecation



All Articles
Loading...
X
Show
Funny
Dev
Pics