IBM BPM, V8.0.1, All platforms > Get started with IBM BPM > Key concepts > Bindings > Binding types > Web service bindings

Use of WSDL document style binding with multipart messages

The Web Services Interoperability Organization (WS-I) organization has defined a set of rules regarding how web services.should be described by way of a WSDL and how the corresponding SOAP messages should be formed, in order to ensure interoperability.

These rules are specified in the WS-I Basic Profile Version 1.1 (http://www.ws-i.org/Profiles/BasicProfile-1.1.html). In particular, the WS-I Basic Profile 1.1 R2712 states: “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.”

This means that, when using a document style SOAP binding for an operation with messages (input, output, or fault) that are defined with multiple parts, only one of those parts should be bound to the SOAP body in order to be compliant with the WS-I Basic Profile 1.1.

Further, the WS-I Attachments Profile 1.0 R2941 states: “A wsdl:binding in a DESCRIPTION SHOULD bind every wsdl:part of a wsdl:message in the wsdl:portType to which it refers to one of soapbind:body, soapbind:header, soapbind:fault , soapbind:headerfault, or mime:content.”.

This means that, when using a document style SOAP binding for an operation with messages (input, output, or fault) that are defined with multiple parts, all parts other than the one selected to be bound to the SOAP body must be bound as attachments or headers.

The following approach is used when WSDL descriptions are generated for exports with web service (JAX-WS and JAX-RPC) bindings in this case:

The JAX-RPC and JAX-WS import bindings honor the SOAP binding in an existing WSDL document with multipart document style messages even if it does bind multiple parts to the SOAP body; however, you are not able to generate web service clients for such WSDL documents in Rational Application Developer.

The JAX-RPC binding does not support attachments.

The recommended pattern when using multipart messages with an operation that has document style SOAP binding is therefore:

  1. Use the document/literal wrapped style. In this case, messages always have a single part; however, attachments have to be unreferenced (as described in Unreferenced attachments) or swaRef-typed (as described in Referenced attachments: swaRef-typed elements) in this case.

  2. Use the RPC/literal style. In this case, there are no restrictions on the WSDL binding in terms of number of parts bound to the SOAP body; the SOAP message that results always has a single child that represents the operation being invoked, with the message parts being children of that element.

  3. For the JAX-WS binding, have at most one message part that is not of type "hexBinary" or "base64Binary", unless it is acceptable to bind the other non-binary parts to SOAP headers.

  4. Any other cases are subject to the behavior described.

Additional restrictions exist when you use are using SOAP messages that do not conform to the WS-I Basic Profile Version 1.1.

Web service bindings