- From: Doug Davis <dug@us.ibm.com>
- Date: Tue, 6 Jan 2009 23:23:51 -0500
- To: public-ws-resource-access@w3.org
- Message-ID: <OF9281854A.62EF70EE-ON85257537.00105918-85257537.00183A0C@us.ibm.com>
The WS-I Basic Profile has the following requirement: R2712 A document-literal binding MUST be serialized as an ENVELOPE with a soap:Body whose child element is an instance of the global element declaration referenced by the corresponding wsdl:message part. In short, this means that when the WSDL contains elements such as: <wsdl:part name="Body" type="tns:AnyXmlType"/> when document-literal binding is used, which we do use, this is in violation of the BP. The "type='...'" needs to be element='...' where '...' is replaced by some GED (global element declaration). WS-Transfer does this on the GetRequest, GetResponse, PutRequest, PutResponse, DeleteResponse and CreateRequest messages. Proposal: Replace the use of 'type's with a well defined GED (wrapper) that has the 'type' as a child. For example: <wsdl:message name="OptionalXmlMessage"> <wsdl:part name="Body" type="tns:AnyXmlOptionalType"/> </wsdl:message> <wsdl:message name="AnyXmlMessage"> <wsdl:part name="Body" type="tns:AnyXmlType"/> </wsdl:message> <wsdl:operation name="Get"> <wsdl:input message="tns:OptionalXmlMessage" wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/Get"/> <wsdl:output message="tns:AnyXmlMessage" wsa:Action=" http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse" /> </wsdl:operation> gets replaced with: <xs:element name='Get'> <xs:complexType> <xs:sequence> <xs:any minOccurs='0' maxOccurs='1' processContents='skip' namespace='##other' /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name='GetResponse'> <xs:complexType> <xs:sequence> <xs:any minOccurs='1' maxOccurs='1' processContents='skip' namespace='##other' /> </xs:sequence> </xs:complexType> </xs:element> <wsdl:message name="GetRequestMessage"> <wsdl:part name="Body" element="tns:Get"/> </wsdl:message> <wsdl:message name="GetResponseMessage"> <wsdl:part name="Body" element="tns:GetResponse"/> </wsdl:message> <wsdl:operation name="Get"> <wsdl:input message="tns:GetRequestMessage" wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/Get"/> <wsdl:output message="tns:GetResponseMessage" wsa:Action=" http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse" /> </wsdl:operation> So the resulting XML on the wire would look like: Request Body: <env:Body> <wst:Get> ... </wst:Get> </env:Body> Response Body: <env:Body> <wst:GetResponse> ... </wst:GetResponse> </env:Body> The pseudo schema for each would be: GetRequest: <wst:Get> xs:any ? </wst:Get> GetResponse: <wst:GetResponse> xs:any </wst:GetResponse> PutRequest: <wst:PutRequest> xs:any </wst:PutRequest> PutResponse: <wst:PutResponse> xs:any ? </wst:PutResponse> DeleteResponse: <wst:DeleteResponse> xs:any ? </wst:DeleteResponse> CreateRequest: <wst:CreateRequest> xs:any </wst:CreateRequest> thanks -Doug ______________________________________________________ STSM | Web Services Architect | IBM Software Group (919) 254-6905 | IBM T/L 444-6905 | dug@us.ibm.com
Received on Wednesday, 7 January 2009 04:24:34 UTC