Help: WS-I doc/lit wsdl with anyType SOAPBody

Discussion in 'XML' started by Sonna Nach, Mar 8, 2005.

  1. Sonna Nach

    Sonna Nach Guest

    Hi All,

    I am writing a doc/lit web services, in which the elements under
    SOAPBody is unknown. That is, these two message are acceptable.

    1. <SOAP-ENV:Body><Tag1>It is ok</Tag1></SOAP-ENV:Body>
    2. <SOAP-ENV:Body><Tag2><Tag3>It is also
    ok</Tag3></Tag2></SOAP-ENV:Body>

    The question is, if I write the wsdl as below, it defines the
    request message to be empty, instead of anyType. If I create an
    element with type=xsd:anyType, this element tag will appear under
    SOAPBody. How do I write the wsdl in this case?

    I would like this wsdl to be ws-i complaince, is it possible to do
    so?

    Cheers,
    Sonna Nach

    ----- wsdl -----

    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions
    name="DataService"
    targetNamespace="urn:dataservice"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="urn:dataservice"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <wsdl:types>
    <xsd:schema
    attributeFormDefault="qualified"
    elementFormDefault="qualified"
    targetNamespace="urn:dataservice"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="DataServiceResponse">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element maxOccurs="1" minOccurs="1"
    name="Token" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </wsdl:types>
    <wsdl:message name="DataServiceResponse">
    <wsdl:part element="tns:DataServiceResponse"
    name="DataServiceResponse"/>
    </wsdl:message>
    <wsdl:message name="DataServiceRequest"/>
    <wsdl:portType name="DataServicePortType">
    <wsdl:eek:peration name="DataService">
    <wsdl:input message="tns:DataServiceRequest"/>
    <wsdl:eek:utput message="tns:DataServiceResponse"/>
    </wsdl:eek:peration>
    </wsdl:portType>
    <wsdl:binding name="DataServiceBinding"
    type="tns:DataServicePortType">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:eek:peration name="DataService">
    <soap:eek:peration soapAction="DataService"/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:eek:utput>
    <soap:body use="literal"/>
    </wsdl:eek:utput>
    </wsdl:eek:peration>
    </wsdl:binding>
    <wsdl:service name="DataService">
    <wsdl:port binding="tns:DataServiceBinding"
    name="DataServicePort">
    <soap:address
    location="http://somewhere.com/dataservice"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Sonna Nach, Mar 8, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    3
    Views:
    498
    Tor Iver Wilhelmsen
    Sep 17, 2004
  2. Replies:
    0
    Views:
    385
  3. Guillaume ALLEON
    Replies:
    0
    Views:
    377
    Guillaume ALLEON
    Jan 30, 2006
  4. wsdeveloper

    getting SOAPBody elements with xsl

    wsdeveloper, Sep 22, 2005, in forum: XML
    Replies:
    1
    Views:
    1,268
    wsdeveloper
    Sep 22, 2005
  5. Allen
    Replies:
    1
    Views:
    253
    Andrew Morton
    Sep 24, 2009
Loading...

Share This Page