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:
- The soap:body element provides information for the SOAP Body element.
- The soap:header and soap:headerfault elements provide information for the SOAP Header element.
- The soap:fault element provides information for the SOAP Fault Details element.
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.
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:
- 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.
- Supply a name for the binding.
- The only supported binding type in this release is the SOAP protocol.
- 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.
- Supply a name for the service.
- Supply a name for the port.
- 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.
- The port's SOAP address node includes a location property, which specifies the address of the port.
The wizard generates a dummy value for the location property.
Be sure to replace the dummy value with a valid value.
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.
- The binding subtype options in the Generate Binding and Service Port dialog box
are a combination of the style and use properties described in this section.
To create a binding:
- In the WSDL view, right-click the Bindings node and choose Add Binding.
A binding node appears.
- If the Properties window is not visible, choose Window > Properties.
- Select the binding node.
- (Optional) Set the Name property to the new name.
- Set the Type property to the port type that the binding will reference.
- Right-click the binding node and choose Add > Binding Operation.
- 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:
- In the WSDL view, right-click the binding node and choose Add > SOAP Binding.
A SOAP binding node appears.
- If the Properties window is not visible, choose Window > Properties.
- Select the SOAP binding node.
- 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:
- 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.
- If the Properties window is not visible, choose Window > Properties.
- Select the SOAP operation node.
- The soapAction property specifies the value of the SOAPAction header for the operation.
- The style property indicates how to translate the binding to a SOAP message.
Set the value to document or RPC.
- Depending on your scenario, add elements to Input, Output, and Fault nodes.
- The Input node allows you to add the following elements: soap:body and soap:header.
- The Output node allows you to add the following elements: soap:body and soap:header.
- The Fault node allows you to add the following element: soap:fault.
- To add a soap:headerfault element, right-click the soap:header node and choose Add headerfault.
- If you added a soap:body element, then you can set the following properties.
- The Parts property indicates which message parts appear somewhere in the SOAP Body element.
- The encodingStyle property can be set to a list of URIs that represent encodings used in the message.
- The use property indicates how to translate the binding to a SOAP message.
Set the value to literal or encoded.
- The namespace property provides information for encoded uses.
- If you added a soap:header element, then you can set the following properties.
The Message and Part properties are required.
- The Message and Part properties reference the message part that defines the header type.
- The use property indicates how to translate the binding to a SOAP message.
Set the value to literal or encoded.
- The encodingStyle property can be set to a list of URIs that represent encodings used in the message.
- The namespace property provides information for encoded uses.
- If you added a soap:headerfault element, then you can set the following properties.
The Message and Part properties are required.
- The Message and Part properties reference the message part that defines the header type.
- The use property indicates how to translate the binding to a SOAP message.
Set the value to literal or encoded.
- The encodingStyle property can be set to a list of URIs that represent encodings used in the message.
- The namespace property provides information for encoded uses.
- If you added a soap:fault element, then you can set the following properties.
- The encodingStyle property can be set to a list of URIs that represent encodings used in the message.
- The use property indicates how to translate the binding to a SOAP message.
Set the value to literal or encoded.
- The namespace property provides information for encoded uses.
Removing Bindings
You can remove a binding from the WSDL file.
To remove a binding:
- In the WSDL view, right-click the binding node and choose Delete
- See Also
- Configuring WSDL File Components
Legal Notices