# Setting a binding

A binding is a top level WSDL object that provides a concrete specification regarding the transmission of messages to and from a web service. A binding references exactly one port type. The structure of a binding corresponds very closely to that of the port type. The binding contains extensibility elements (for example, SOAP, http, and mime) that specify protocol specific details. Each port within a service references exactly one binding.

You can create a binding by right clicking in any blank space in the Design view and selecting Add Binding. You can create a new binding, reuse an existing one, or import one.

## Creating a new binding

To create a new binding for your port, complete the following steps:

1. In the Design view, right-click your port and click Set Binding > New Binding.
2. In the Name field, type the name of the binding. The name should be unique among all bindings defined within the enclosing WSDL document. Click OK. To select the new binding, click the binding object.
3. Type any information about the binding you want the user to read in the Documentation pane.

Note: A PortType is a named set of abstract operations and the abstract messages involved. You can either create a new port type for your binding, reuse an existing one, or import one. For more information, see Setting a Port Type.
Tip: You can also create a new binding for your port using the Outline view. Right click on the Bindings folder and select Add Binding.

## Reusing a binding for a port

To reuse a binding for your port, complete the following steps:

1. In the Design view, select your port.
2. In the Properties view, click the General pane.
3. From the Binding drop down list, select the binding you want to use.

## Regenerating a binding

To regenerate a binding, complete the following steps:

1. Right-click the binding you want to regenerate.
2. Select Generate Binding Content.
3. Specify the required binding information. If you are modifying an existing binding, select the Overwrite existing binding information check box.

## Import an existing binding

To import an existing binding for your port, complete the following steps:

1. In the Design view, right-click your port and click Set Binding > Existing Binding.
2. Optional: In the Name field, type a search string to filter the list or leave the field blank to view all.
3. You can import a binding by selecting one of the following options:
   - Workspace: lists the bindings available in your workspace.
   - Enclosing Project: lists the bindings available in the project that contains your file.
   - Current Resource: lists the binding types available in your current file.
   - Working Sets: lists the bindings available in a specified set of files. To specify a working set, click Choose. You can select files from an existing working set or create a new working set. Once you have selected the files, click OK.
4. The bindings will be listed. Select one and click OK. In the Design view, click the binding object.
5. In the Properties view, type any information about the binding you wish the user to read in the Documentation pane.

Related concepts
Editing WSDL files with the WSDL Editor
Related tasks
Creating a new WSDL file
Editing WSDL files