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">
<wsdlart element="tnsataServiceResponse"
name="DataServiceResponse"/>
</wsdl:message>
<wsdl:message name="DataServiceRequest"/>
<wsdlortType name="DataServicePortType">
<wsdlperation name="DataService">
<wsdl:input message="tnsataServiceRequest"/>
<wsdlutput message="tnsataServiceResponse"/>
</wsdlperation>
</wsdlortType>
<wsdl:binding name="DataServiceBinding"
type="tnsataServicePortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdlperation name="DataService">
<soapperation soapAction="DataService"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdlutput>
<soap:body use="literal"/>
</wsdlutput>
</wsdlperation>
</wsdl:binding>
<wsdl:service name="DataService">
<wsdlort binding="tnsataServiceBinding"
name="DataServicePort">
<soap:address
location="http://somewhere.com/dataservice"/>
</wsdlort>
</wsdl:service>
</wsdl:definitions>
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">
<wsdlart element="tnsataServiceResponse"
name="DataServiceResponse"/>
</wsdl:message>
<wsdl:message name="DataServiceRequest"/>
<wsdlortType name="DataServicePortType">
<wsdlperation name="DataService">
<wsdl:input message="tnsataServiceRequest"/>
<wsdlutput message="tnsataServiceResponse"/>
</wsdlperation>
</wsdlortType>
<wsdl:binding name="DataServiceBinding"
type="tnsataServicePortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdlperation name="DataService">
<soapperation soapAction="DataService"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdlutput>
<soap:body use="literal"/>
</wsdlutput>
</wsdlperation>
</wsdl:binding>
<wsdl:service name="DataService">
<wsdlort binding="tnsataServiceBinding"
name="DataServicePort">
<soap:address
location="http://somewhere.com/dataservice"/>
</wsdlort>
</wsdl:service>
</wsdl:definitions>