kkao77 a écrit :
Thanks olrt,
So does that mean if I use .net, I don't need to worry abou schema in
this case especially writing webmethod(), it is more useful for people
who prepares xml documents to form those elements and attributes?
I think I hadn't been clear.
If you have total control of both the client and server sides, you
don't need to validate the syntax of the objects on the server since
you have control of the objects'syntax on the client.
I thought I would create schema on server end so the user could
validate some info. once they consume my service. and I was wondering
since they have to create proxy, there is not really xml document to
validate against to, becuase their deserialized xml becomes a class for
them to use and each property has it's own type. Am I right? Thanks
for help.
Be aware that there are only certain types that are WSDL-compatible.
This is the case for primitive types (string, double, etc.) and some
complex types (XmlNode, DataSet).
If the class you expose to client is not WSDL-compatible, you'll have
to make it IXmlSerializable.
But unfortunately this isn't enough.
For example in .NET, wsdl.exe (which can be used to generate a proxy)
generates a DataSet-parametered method for a XmlDocument-derived
parametered Webmethod :-(
So the client will have to edit the proxy code to effectively consume
the exposed class.
See my post "XmlDocument-derived class ..." in this newsgroup that
exposes some issues related to passing a complex-type parameter through
SOAP.
Regards,
Olivier.