# Setting a port type

A port type is a named set of abstract operations and the abstract messages involved. Each operation refers to an input message and output messages. A port type is reference by a binding object. Each binding references exactly one port type. Since each port refers to exactly one binding, each port has exactly one port type.

You can create a port type by right clicking on the port types group and selecting Add Child > portType . As a convenience you can also add a port type via a binding or port object. This allows you to create a port type and modify the binding to reference to the new port type in one action. You can either create a new port type for your binding, re-use an existing one, or import one

Parent topic: Editing WSDL files

## Create a new port type

If you want to create a new port type for your binding, follow these steps:

1. In the Graph view, right-click on a binding or port object (note that port must reference a binding) and click Set Port Type.
2. Click the Create a new port type radio button.
3. Type the name of the port type in the Name of port type field. The name should be unique name among all port types defined within in the enclosing WSDL document. Click Finish.
4. Click the port type. Type any information about the port type you wish the user to read in the Documentation field.

Tip: You can also create a new port type for your binding using the Outline view.

Once you have created a port type, you can add operations to it, which can send and receive messages.

## Reuse a port type for a binding

If you want to reuse a port type for your binding, follow these steps:

1. In the Graph view, right-click on a binding or port object (note that port must reference a binding) and click Set Port Type.
2. Click the Select an existing port type radio button.
3. The existing bindings will be listed. Select one and click Finish.

## Import a port type for a binding

.If you want to import an existing port type for your binding, follow these steps:

1. In the Graph view, right-click on a binding or port object (note that port must reference a binding) and click Set Port Type.
2. Click the Import port type from a file radio button. Click Browse.
3. Select the file that contains the port type you want to use. Click OK.
4. The bindings in the file will be listed. Select one and click Finish.
5. Click the port type. Type any information about the port type you wish the user to read in the Documentation field.

Related concepts
Editing WSDL files with the WSDL Editor

Related tasks
Creating a new WSDL file
Editing WSDL files

(C) Copyright IBM Corporation 1999, 2005. All Rights Reserved.