Hi all,
many probably have noticed that i have been posting on here alot lately, and
after many informative posts i am getting down and making progress with my
web service design, but now again i am stuck! and i ask for your help once
again.
I was originally planning to send back strings if i needed to return XML
data, something i have now found to be frowned at by some developers:
http://blogs.msdn.com/mpowell/archiv...12/130637.aspx
I have decided to return a XMLDocument considering that it gets serialized
into XML and can be sent back and consumed with no problems (In theory) by
third party applications. The reason i have taken this approach is because i
need to ensure my data is in the correct format and has the correct
structure, and for this i am using a collection on XSD files which will
contain the XML representation of my request and responses from my web
service. I will then go onto build my own WSDL file and start coding my Web
service.
My question is, if i have created a response that maps to XML for instance:
<xs:element name="Start">
<xs:complexType>
<xs:sequence>
<xs:element name="elements">
<xs:complexType>
<xs:sequence>
<xs:element name="element">
<xs:simpleType>
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
XML:
<start>
<elements>
<element>E1</element>
<element>E2</element>
</elements>
</start>
if i build my WSDL file to have the XSD schema above to the response of my
method that returns the above XML will it validate it? or should i add the
Schema directly To the XML generated, this way may invalidate my need to
generate my own WSDL, but I feel for this solutions as this is going to be a
large production web service that i should design the messages thoroughly.
I hope that i have explained myself properly, if anyone needs any clarity
then please do not hesitate to ask. I guess as concise version of this
question would be, if i design my XSD's and build my WDSL and the return type
for a method is a XMLDoc, will my XSD validation still work as the XMLDoc
will be serialised in XML or will it mess up?
Thanks,
Rob