Does anyone know how I can get a web service client proxy to use classes
created by XsdObjectGen.exe instead of WSDL.exe (or "Add Web Reference")?
It would be really nice to generate a class from a shema using XsdObjectGen
and use this as a parameter and/or return value of the web service. However,
when you build that, the client must work with the WSDL.exe generated proxy
class and not the more user-friendly XsdObjectGen class. I'm looking for a
performant and maintainable solution. A couple of things I've thought of:
1. Manually create/modify the proxy classes. I'm not sure if this is as
simple as substituting my XsedObjectGen class for the WSDL class in the
SOAPHttpClientProtocol subclass, but even so, it would decrease
maintainability (No more "Update Web Reference")
2. Create a helper function to serialize from the WSDL generated class and
deserialize into the XsdObjectGen class. I'm concerned about performance here.
Has anyone has experience with these methods or know a better way to let the
client work with XsdObjectGen classes?
Thanks,
Dave
Steven Cheng[MSFT] - 10 Feb 2005 07:45 GMT
Hi Dave,
Welcome to Webservice newsgroup. As for the XsdObjectGen tool, it is a
serialize mapping tool which can help generate class with the proper
attributes so that many different serialize formatter( binary , soap ) can
correctly serialize the class generated by it. However, as for the
webservice client , the main class is a proxy class which derived from
SoapHttpClient, this class's main task is to build the SOAP MESSAGE for
webservice and use HttpWebRequest to send out the message. So I don't think
the XsdObjectGen tool is the appropriate one to help generator such a
class. However, as for some other paramter classes or return value classes,
it's ok to use the XsdObjectGen to generator their class source.
Thanks & Regards,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)