Configuring WSDL Bindings

See Also

You can use the WSDL Editor to create bindings. In addition, you can modify bindings that were generated by the New WSDL wizard.

In a WSDL file, a binding defines message format and protocol details for a port type.

You can bind the binding to the SOAP 1.1 protocol. The binding contains a SOAP binding node and one or more operations. Each operation can contain the following elements:

If you change the name of a binding, then the WSDL Editor renames all occurrences in the same file. To rename all occurrences in associated XSD, WSDL, and BPEL files as well, right-click the binding node and choose Refactor > Rename.

Creating a Binding and Service From a Port Type

You can quickly create a binding and a service from an existing port type. If you want to modify the binding afterward, then see the appropriate steps in Creating a Binding.

To create a binding and service from a port type:

  1. In the WSDL view, right-click the port type node choose Add > Binding and Service Port.
    The Generate Binding and Service Port dialog box appears.
  2. Supply a name for the binding.
  3. The only supported binding type in this release is the SOAP protocol.
  4. The binding subtype options indicate how to translate the binding to a SOAP message. If your settings for message parts and the binding subtype do not conform to the WS-I Basic Profile, an error message appears.
  5. Supply a name for the service.
  6. Supply a name for the port.
  7. Click OK.
    A binding node and a service node appear. The binding node contains a SOAP binding node and one or more operations. The service node contains a port node.

Creating a Binding

Instead of quickly creating a binding and service from an existing port type, you can create the binding, service, and their subnodes individually. This section describes how to create the binding, and then how to configure the SOAP information.

To create a binding:

  1. In the WSDL view, right-click the Bindings node and choose Add Binding.
    A binding node appears.
  2. If the Properties window is not visible, choose Window > Properties.
  3. Select the binding node.
  4. (Optional) Set the Name property to the new name.
  5. Set the Type property to the port type that the binding will reference.
  6. Right-click the binding node and choose Add > Binding Operation.
  7. If the binding's port type has more than one operation, then the Select Operation dialog box appears. Choose one or more operations, and click OK.
    One or more operation nodes appear.

To add a SOAP binding node:

  1. In the WSDL view, right-click the binding node and choose Add > SOAP Binding.
    A SOAP binding node appears.
  2. If the Properties window is not visible, choose Window > Properties.
  3. Select the SOAP binding node.
  4. The style property indicates how to translate the binding to a SOAP message. Set the value to document or RPC.

To configure the SOAP elements for an operation:

  1. In the WSDL view, right-click the operation node and choose Add > SOAP Operation.
    A SOAP operation node appears. This node contains information for the operation as a whole.
  2. If the Properties window is not visible, choose Window > Properties.
  3. Select the SOAP operation node.
  4. The soapAction property specifies the value of the SOAPAction header for the operation.
  5. The style property indicates how to translate the binding to a SOAP message. Set the value to document or RPC.
  6. Depending on your scenario, add elements to Input, Output, and Fault nodes.
  7. To add a soap:headerfault element, right-click the soap:header node and choose Add headerfault.
  8. If you added a soap:body element, then you can set the following properties.
  9. If you added a soap:header element, then you can set the following properties. The Message and Part properties are required.
  10. If you added a soap:headerfault element, then you can set the following properties. The Message and Part properties are required.
  11. If you added a soap:fault element, then you can set the following properties.

Removing Bindings

You can remove a binding from the WSDL file.

To remove a binding:

See Also
Configuring WSDL File Components

Legal Notices