Scribble.orgCommunity Documentation

Chapter 6. Service Interfaces

6.1. WSDL
6.1.1. Generating

To generate WSDL definitions for a Choreography Description it will be necessary to set some appropriate properties on either the CDL file, or the project in which the file is contained.

Select the 'Properties' menu item on either the CDL file, or the project, and select the WSDL Generation properties tab. If the properties for the project are selected, then these will (by default) be inherited by all CDL files within that project. However, the properties on the CDL file can be used to override the project's default values.

The properties tab will contain three relevant properties. The first is to enable the generation and validation of WSDL - this must be set to 'true'. The second property determines which version of WSDL should be generated (1.1 or 2). The third property determines what type of binding and service information should be generated (if any).

Once these properties have been setup, the changes should be applied.

To generate WSDL definitions, associated with a Choreography Description, select the 'Choreography->Generate->WSDL' menu item on the context menu associated with the appropriate '.cdm' file. If the 'Generation and Validation Enabled' property has not been set to true, a warning message will be displayed indicating that the WSDL cannot be generated.

If the generation is successful, a new sub-folder will be created in the same folder as the CDL file. This folder will have the name of the Choreography Description with the suffix '_wsdl'. This folder will contain WSDL files for all of the service endpoint RoleType/Behaviors defined in the Choreography Description. The name of the generated interfaces will be obtained from the Behavior's interface field. If this has not been defined, then the interface will be named after the Behavior with the suffix 'Port'.

Any message types (WSDL1.1) or complex types (WSDL2) that are used in the WSDL operations, and have the same namespace as the interface, will have a placeholder included in the generated WSDL. Any import statements, or content placed within message/complex type definitions, will be preserved whenever the WSDL is re-generated. Similarly, if the SOAP RPC binding and service information is generated (currently only for WSDL1.1), the location details will be preserved across re-generations of the WSDL documents.