code_junkie

Deserialize SOAP array in C#

Nov 12th, 2011
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. [SoapRpcMethodAttribute("Action", Use = SoapBindingUse.Literal)]
  2.  
  3. [SoapRpcMethodAttribute("Action", Use = SoapBindingUse.Literal)]
  4. [return: XmlArrayAttribute("Result")]
  5. public ComplexType[] getArray(int customerId, int subCustomerId, int subscriptionId, int type)
  6. {
  7. object[] result;
  8. result = Invoke("getArray", new object[] { id });
  9. return ((ComplexType[])(result[0]));
  10. }
  11.  
  12. <getArray SOAP-ENC:root="1">
  13. <Result SOAP-ENC:arrayType="ns1:SOAPStruct[1]" xsi:type="SOAP-ENC:Array" xmlns:ns1="http://soapinterop.org/xsd">
  14. <item>
  15. <id xsi:type="xsd:integer">60</id>
  16. <name xsi:type="xsd:string">John</name>
  17. <type xsi:type="xsd:string">1</type>
  18. </item>
  19. <item>
  20. <id xsi:type="xsd:integer">99</id>
  21. <name xsi:type="xsd:string">Jane</name>
  22. <type xsi:type="xsd:string">1</type>
  23. </item>
  24. </Result>
  25. </getArray>
Add Comment
Please, Sign In to add comment