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

S

Sonna Nach

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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top