You can create a Web service with the wizard that will guide you through the creation of the component. The wizard is invoked from a class diagram and is only available if you use the Java or the .NET family.
You can either create a Web service without selecting any class, or use the standard approach that consists in selecting an existing class first and then start the wizard from the contextual menu of the class.
You can also create several Web services of the same type by selecting several classes at the same time. The wizard will automatically create one Web service per class. The classes you have selected in the class diagram become Web service classes, they are renamed to match the naming conventions standard, and they are linked to the new Web service component.
The wizard for creation of Web services lets you define the following parameters:
Property |
Description |
---|---|
Name |
Name of the Web service component |
Code |
Code of the Web service component |
Web service type |
Interface or Implementation. Interface refers to a component that defines the service interface only. Implementation refers to a component that implements a service interface |
Component type |
The component type depends on the web service type. You can select among a list of web service interface or implementation protocols |
Web service implementation class |
Defines the class that is used to implement the Web service |
Create symbol |
Creates a component symbol in the diagram specified beside the Create symbol In check box. If a component diagram already exists, you can select one from the list. You can also display the diagram properties by selecting the Properties tool |
Create Class Diagram for component classifiers |
Available only for stateless session beans and servlets. It creates a class diagram with a symbol for each class and interface. If you have selected classes and interfaces before starting the wizard, they are used to create the component. This option allows you to display these classes and interfaces in a diagram |
When you have finished using the wizard, the following actions are executed:
A Web service component flagged as 'Web service' is created
A Web service implementation class is created and visible in the Browser. It is named after the original class if you have selected a class before starting the wizard. If you have not selected a class beforehand, it is prefixed after the original default component name to preserve coherence
A default operation with the "Web method" flag is created
Depending on the component type, required interfaces associated with the component are added