Forum Stats

  • 3,770,034 Users
  • 2,253,052 Discussions
  • 7,875,276 Comments

Discussions

XML: WSDL anyType

Swapnil Kharwadkar
Swapnil Kharwadkar Member Posts: 136
edited Aug 23, 2012 10:14AM in General XML
Hi

My wsdl has 10 operations.
Response for each operation differ and depends on request, so schema for response does not exist.
I need to define schema for response type in WSDL.
My idea is to have request of different 10 types (1 schema for each operation) and response to be free-form XML. That is, any XML can be received.

How can I use xsd:anyType for this purpose? Any thoughts?


Thanks and Regards
Swapnil Kharwadkar
Tagged:

Answers

  • Jason_(A_Non)
    Jason_(A_Non) Member Posts: 2,044 Silver Trophy
    This is based off an answer I received when I asked a similar question about allowing any XML to be received by a web service. This sample shows how to use xsd:anyType to accomplish that.
    <xsd:element name="executeProcess">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="in0" type="xsd:anyType" nillable="true" minOccurs="1" maxOccurs="1"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
This discussion has been closed.