Home

 

Creating bindings between WSDL ports and port types

A binding is used to link a port type to a port. The class diagram editor offers you several ways to do this. For example, you can use the WSDL Binding Creation tool in the palette. To do this, select the tool in the palette and click the port (remember that a port is shown as a small square on the side of a service). Then drag the cursor to the port type. A new binding is created between the port and the port type. As shown in Figure | 28, this binding is modeled as a dependency with stereotype <<WSDL | nding>> between the two elements. The lollipop notation is used to represent the interface provided by the port.

Figure 7-28 Class diagram showing a binding between a port and its port type

The last step is to generate the content for this binding. Select the dependency representing the binding and open the Properties view. On the General page, click Generate Binding Content and complete the wizard .

Figure 7-29 Properties view showing binding properties

After you have created the entire Web service, you can directly create an implementation of the Web Service within the diagram editor. Right-click a WSDL service component, and select Implement Web Service. This starts the Web Service wizard that guides you through the process. You can also use the diagram editor to create a Web Service client for a given Web Service. To do this, right-click a WSDL service component and select Consume Web Service.

ibm.com/redbooks