Home

 

Creating, editing, and viewing WSDL elements in UML class diagrams

Rational Application Developer v7.5 enables developers to represent and create Web Service Description Language (WSDL) Version 1.1 and XML Schema (XSD) definition elements using UML class diagrams.

To use this feature, the Web Service Development capability must be enabled beforehand. In the preferences dialog, accessed by selecting Window Æ Preferences, expand the General node to access the Capabilities page. In the Capabilities page, click Advanced. In the dialog, expand the Web Service Developer node and select Web Service Development.

Figure | -14 shows the graphical representation of a WSDL service. To visualize a service, select its WSDL file from the Enterprise Explorer and drag it to a class diagram. Alternatively, right-click a WSDL file and select Visualize Æ Add to New Diagram File Æ Class Diagram.

Figure 7-14 Graphical representation of a Web service

Note that by default the external view of a service is shown. To switch to the compressed view, right-click the service and select the Filter submenu and clear Show External View.

Like Enterprise JavaBeans, WSDL services are displayed as UML classes on a class diagram with appropriate stereotypes:

The individual ports of a service are depicted as small squares on the side of the class. The class is stereotyped as <<WSDL Service>>. The functionality provided by a port is exposed by a port type.

A port type is displayed as a UML interface that is modeled using the lollipop notation. In Figure | -14 you can see the port type explicitly displayed as an interface being linked to its port. This link is realized as a dependency with stereotype <<WSDL Binding>>. It describes the binding being used for this port type. A port type references messages that describe that type of data being communicated with clients.

A message itself consists of one or more parts that are linked to types.
Types are defined by XSD elements. Figure | -14 shows that messages are displayed as UML classes with the <<WSDL Message>> stereotype. XSD elements are also displayed as UML classes, although none are shown in Figure | -14.
ibm.com/redbooks