EDN Admin
Well-known member
If I have a web service that has the "http://myapp/app1ws" namespace, and I create a web method in it that takes a List<string> as a parameter, the WSDL will contain the ArrayOfString type in the same "http://myapp/app1ws" namespace, itll have the
tns prefix, it wont create create a separate schema for it.
I havent been able to find any example that would help me create a class that implements the IXmlSerializable interface, and that has an XmlSchemaProvider that doesnt specify its own constant namespace. As far as Ive seen, if I create MyObject and and
use it as a parameter in another method of my web service above, I would need to hard code the "http://myapp/app1ws" in MyObjects class. Then if I want to use it in another web service, I have to create another copy of MyObject with a different namespace
that matches that other web service.
There must be a right way to do this. Why can List<string>, or any other complex type add itself to my web services schema, and MyObject cant? Is there a way to not set a namespace in an XmlSchemaProvider and let it go to default? Ive tried leaving
it empty, but it just creates a new schema with an empty namespace.
Thanks!
View the full article
tns prefix, it wont create create a separate schema for it.
I havent been able to find any example that would help me create a class that implements the IXmlSerializable interface, and that has an XmlSchemaProvider that doesnt specify its own constant namespace. As far as Ive seen, if I create MyObject and and
use it as a parameter in another method of my web service above, I would need to hard code the "http://myapp/app1ws" in MyObjects class. Then if I want to use it in another web service, I have to create another copy of MyObject with a different namespace
that matches that other web service.
There must be a right way to do this. Why can List<string>, or any other complex type add itself to my web services schema, and MyObject cant? Is there a way to not set a namespace in an XmlSchemaProvider and let it go to default? Ive tried leaving
it empty, but it just creates a new schema with an empty namespace.
Thanks!
View the full article