Re: IXmlSerializable.GetSchema creates mutiple schema elements in my wsdl



The reason I thought it was ignoring the second schema element is because
when I consume the web service, the method that returns the datatype
specified in the second scheme element has a return type of XmlElement in
the proxy class, rather than the actual data type.

"John Saunders [MVP]" <john.saunders at trizetto.com> wrote in message
news:esGz7SWyHHA.4184@xxxxxxxxxxxxxxxxxxxxxxx
"Jeremy" <nospam@xxxxxxxxxx> wrote in message
news:ejg8CkVyHHA.5204@xxxxxxxxxxxxxxxxxxxxxxx
I've built a class that uses the IXmlSerializable interface to do custom
serialization. I"ve then used the IXmlSerializable.GetSchema() method to
output the schema of my class to the wsdl in my web service. The problem
is that the schema of my class appears in a seperate schema element in
the wsdl. It needs to be in the main schema element so that an
application can consume the web service properly, because I've found that
at least with .net apps, they only consume the first schema element. How
can I get only one schema element in the wsdl?

Jeremy,

I'll try to look at this in more detail later, but for now have a comment:
you are mistaken about .NET applications only consuming the first schema
element. I have a production web service using four schemas. I did this by
using wsdl:import elements outside of the <wsdl:types> element. It's
apparently not WS-I compliant, but it works well. I intend (in my copious
spare time) to see if I can do the equivalent by adding <schema> elements
in the <wsdl:types> and using <xs:include> to load the "real" schemas.
--
John Saunders [MVP]



.


Loading