Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Unable to deserialize SOAP response

Thread Tools

Unable to deserialize SOAP response

Fredy Villa
Posts: n/a
I have read the .net documentation about custom soap messages and
using xml and soap attributes to deal with this problem, but after
almost 2 days I find myself staring at code that should work, but

The following is the SOAP response I get (which btw is correct)

<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=""
<ns0:getVendorListResponse xmlns:ns0="urn:local"
<ns0:return xsi:type="SOAP-ENC:Array" xmlns:bean="java:com.ggt.core"
<item xsi:type="bean:VendorHeader"
<shortName xsi:type="xsd:string">Westin Stonebriar Resort,
North Dallas</shortName>
<vendorId xsi:type="xsd:int">13526</vendorId>
<name xsi:type="xsd:string">The Westin Stonebriar
<contactId xsi:type="xsd:int">593922</contactId>

This is the method from my proxy class:

<System.Web.Services.Protocols.SoapdocumentMethodA ttribute("getVendorList",
ResponseElementName:="getVendorListResponse",Use:= SoapBindingUse.Literal,
ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Function getVendorList(ByVal arg0 As Session) As
Dim results() As Object = Me.Invoke("getVendorList", New
Object() {arg0})
Return CType(results(0),VendorHeader())
End Function

My VendorHeader class definition:

<System.Xml.Serialization.SoapTypeAttribute("item" ,
"java:com.ggt.core")> _
Public Class VendorHeader

Public shortName As String
Public vendorId As Integer
Public name As String
Public contactId As Integer

end class

I get a response and when I serialized to a file I get:

<?xml version="1.0" encoding="utf-8" ?>
<ArrayOfVendorHeader xmlnssd=""
xmlnssi="" />

Notice that it doesn't return null, but the array has no items!

What Xml or SOAP Attributes do I need to get the result to correctly
my array of VendorHeaders? I got a soap response but I can't get it to
deserialize into an array of my class VendorHeader.

I will apprecitate any help,

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make soap request and receive soap response from php soapservice Ivan S ASP .Net 0 08-13-2008 03:35 PM
SOAP Request is repeated in the SOAP response. comp.text.xml XML 0 09-20-2006 08:41 AM
Why does viewstate deserialize object as hashtable? ASP .Net 3 04-09-2005 07:43 PM
How to "deserialize" session contents?? Sidney Pecul ASP .Net 1 05-07-2004 11:02 PM
Calling BinaryFormatter:Deserialize(Stream); Asynchronously Assaf ASP .Net 1 02-07-2004 11:20 PM