I am writing a web service that accepts and returns an XML message - I know
the issues behind this but want to be able to process the messages
generically using XSD / XSLT.
My problem occurs with the way the .NET framework appears to handle the
XmlNode, in particular the generation of the WSDL. The details follow:
I define the code behind method as
[WebMethod]
public XmlNode Operation(xmlNode request)
However when I look at the WSDL generated I see the following for the input
XML Message:
<element name="Operation">
<complexType>
<sequence>
<element minOccurs="0" maxOccurs="1" name="request">
<complexType mixed="true">
<sequence>
<any />
</sequence>
</complexType>
</element>
</sequence>
</element>
Which results in the XML in the SOAP:Body looking like like this when called
using the reference.cs generated interface:
<Operation xmlns="..">
<request>
.... I can place the XML I require here
</request>
</Operation>
So the .NET framework - or is it the WSDL - has inserted an extra node
<request> in the XML that I do not require.
Does anyone know how to define this so that THE COMPLETE XML DOCUMENT in the
SOAP:Body is handled by the XmlNode defined in the code behind without it
inserting its own nodes?
TFAH
Paul