By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,382 Members | 2,058 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,382 IT Pros & Developers. It's quick & easy.

Using XML & ASP.NET (or what do I *need* to know?)

P: n/a

I'm trying to learn an acceptable way to marshal complex data between an
ASP.NET web service and an ASP.NET web client. Initially, it will be
enough for the client to display the data from the service, but
eventually, I'll have to write a client that will allow for modification
of the data and return it to the service.

I gather from bits and pieces that I'm reading that I can convert the
data into an XML document and it is this document which is sent to the
client over an HTTP connection. Is this assumption correct?

If so, what's the best way to convert the data into XML? Specifically, I
have multiple instances of a class managed by a linked list.

I've been fooling around with XmlSerializer (System.xml.serialization),
since that seems as if it will convert the class instances to formatted
XML. On the other hand, the docs for XmlSerializer only talk about
writing the XML to a file, which is not what I want to do.

Can someone put me on the right track please? (Ultimately, do I want to
write a web method in the service which returns an XML document?

TIA.
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


Karl wrote:
I'm trying to learn an acceptable way to marshal complex data between an
ASP.NET web service and an ASP.NET web client. Initially, it will be
enough for the client to display the data from the service, but
eventually, I'll have to write a client that will allow for modification
of the data and return it to the service.


A web service uses SOAP to marshall the data and that is all implemented
in .NET in a way that you do not deal with SOAP at all, you write your
ASP.NET web service simply by extending a certain class and by using
attributes to indicate that certain methods are web methods. .NET then
exposes a WSDL description automatically for yourservice and any client
like an ASP.NET client can then use that WSDL description to set up code
to communicate with the web service. Within .NET you would simply need
to have the wsdl.exe tool read the WSDL description of the web service
and generate a .NET proxy class for the service which the client code
can then use like a normal .NET object with methods that are called
where .NET under the hood then makes the SOAP requests to the web
service and receives the SOAP response and makes the data available as
normal .NET data types.

See
<http://samples.gotdotnet.com/quickstart/aspplus/doc/webservicesintro.aspx>
for an introduction and make use of the other sections there e.g. "web
service type marshalling".
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.