![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
#3
| |||
| |||
|
|
"Jeremy" <nospam (AT) please (DOT) com> wrote in message news:ejg8CkVyHHA.5204 (AT) TK2MSFTNGP03 (DOT) phx.gbl... 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] |
#4
| |||
| |||
|
|
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. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |