When you are working with a project in VS.NET, and you want to add a
reference to a webservice, you right click on the "References" line under
your project's name in the "Solution Explorer", and choose "Add Web
Reference..." to add a webservice. Then, when you use the webservice, it
will look something like this in your code:
net.noah.coad.MyService ms = new net.noah.coad.MyService();
string phone = ms.LookupPhoneNumber("Noah Coad");
All the information on the _type_ of data being passed to and from the
webservice is downloaded by VS.NET from the webservice and stored as
somewhat of a proxy on your local system. So if the "LookupPhoneNumber"
method returned a more complex structure, that sturcutre, as long as it can
be serialized by the CLR, will look like it exists on your computer, even
though the original definiation is kept by the webservice. For Example:
net.noah.coad.AddressStruct addr = ms.LookupAddress("Noah Coad");
Since the webservice uses a struct called "AddressStruc", it will also be
avalible in your local project since you added the web reference to the
webservice.
Does this make more sense?
- Noah Coad -
Microsoft MVP
Alvin Bruney said:
I don't understand your response. Can you go into more detail?
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Noah Coad said:
If you are using VS.NET, it should be realtively clear that it is normal
that the scheme/class structure does get transmitted as part of the response
of the webservice. This is handled automatically.
- Noah Coad -
Microsoft MVP
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
I'm pushing a class across the wire thru a webservice. The class contains
a
nested structure. On the client-side, the deserialized class does not
contain the embedded structure. It is simply a class and a structure on
the
receiving end. Is this normal? How do I enforce the schema across the
serialization layer?
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b