I really need some help and know there are a lot of .Net Guru's taht read
these post and I need help.Below is what I am trying to do:
I have a web service that returns a class object that represents data being
returned. For example:
public Class Customers
public Name as String
Public Billing Address as Address
Public Shipping Address as Address
End Class
public Class Address
Public Street AS String
Public State AS String
Public City AS String
Public Zip AS String
End Class
When called from a .Net application the user can create an object to hold
the return data. This allows them to access the data directly without any
parsing: myCust.Name, myCust.ShippingAddress.Street, etc. When called by a
non-.Net language (Java, Perl) this all works and they get a string with the
XML representation of the object. They can then load this into an XML
parser and read the data. The problem is we have a customer that is usng
the SOAP Toolkit 3.0 and they cannot access the site being literal encoded
and they have to have it RPC encoded. I have created an RPC version of the
classes that just call the orignal classes, but it errors out trying to
return the class object.
Questions:
1) Does anyone know of anyway to automatically create the XML representation
of the class as a String so it can be used in an RPC version of the web
service? I have tried using the XmlSerializer and it give me an error about
trying to to a process that is not allowed. I have never used the
XmlSerializer and wonder it I am just doing something wrong.
2) Does anyone have any experience wiht using the SOAP Toollkit. If so,
does anyone have any example code on how to call a .Net web service that
uses literal encodinf. Most languages (Java, Perl, etc) have a way to set
this before making the SOAP call, but neither me or our client has found a
way to do this. If we could figure this out this is the prefered solution
so we do not have to have 2 versions of all our web services.