In the Service Interface Editor (SIE), you can create from scratch simple service interfaces or services. Note that they contain only the basic attributes of a service interface or a service. You later can modify these attributes and add new ones. You use the service creation wizard to create new interfaces, operations and parameters. You can start the wizard from different tools and perspectives in the Developer Studio. Depending on the context in which the wizard is called, it is initially filled with default values if such are available. When you create a new WSDL document stored in a chosen location, the document contains a sample skeleton of WSDL definition which gives you a quick start in the modeling (one operation with one input parameter and one output parameter, both of type string). Next, you can edit the service interface by renaming, removing or copying one or more of its elements.
You can modify existing service interfaces and their XSD schemas by editing, deleting and/or renaming their elements and details. You can modify a service interface that you created from scratch or a back-end service you downloaded and saved locally.
In the Data Types tab page of the SIE, you can edit and define data types and the relation between them. You can create new namespaces in the XSD schema or edit existing ones. Furthermore, you can reuse and copy data types between different namespaces.
All changes you make in the Service Interface or the Data Types tab page are immediately reflected in the source code of the service interface. You can:
Edit service interfaces, service operations, parameters, and faults.
Delete elements of the service interface.
Add namespaces to the XSD schema of a service interface.
Edit the data types in the XSD schema of a service interface.
Copy element and data types between different namespaces.
You can thus customize your service interface by adding or removing elements, so that it is suitable for your needs.
You have the option to undo or redo your actions.
You need to either:
Create a new project. For more information, see Creating Service Interfaces or Services .
or
Open an existing project.
Creating a Service Interface
From the menu path, choose WSDL .
. Expand the node and chooseIn the dialog that appears specify the details for the service interface that you want to create.
Select the development component and the exact folder in which you want to store the new service interface. Optionally, you can change the WSDL file default name. Choose the Next pushbutton.
Optionally, you can change the target namespace. You can also choose:
Whether to create a WSDL skeleton
Whether to use SOAP or HTTP protocol
What binding options to use
For more information on protocols and binding options, see the WSDL specifications: www.w3c.org
Choose the Finish pushbutton.
Editing a Service Interface
From your project tree, select the WSDL file you want to edit. From the context menu, choose
. In case the SIE is your default editor, double click the WSDL file.Select the element you want to edit. In the General and Documentation sections, edit the name, type or documentation properties of the element.
To delete an attribute, select it and choose the Remove pushbutton or choose it from the context menu.
You can use multiple selection of attributes by pressing and holding the Ctrl key and selecting the attributes you want to delete.
To edit the data types in an attribute, click the Type: link in the details view of the selected parameter.
You can also edit data types by opening the Data Types tab page in the SIE
Adding a Service Operation
When you create a new service operation in your service interface, the WSDL definition of the service operation contains input and output parameter, which you need to define. In addition, you can change the service operation type. In the General view, you can choose from the two service operation types in accordance with the service operation structure you need:
ASYNCHRONOUS - the client invoking the service does not wait for a response.
REQUEST_RESPONSE - the client invoking the service requires a response to the request.
If the SIE is not your default editor, from the WSDL file context menu choose Service Interface Editor .
and from the list with editors, choose theTo create a new service operation:
In your project tree, navigate to the folder, in which the WSDL you want to edit is located. Select the service and double-click it to open it with the SIE.
To open a WSDL file directly with the SIE, you need to configure it as your default editor. For more information, see Modeling Services with the Service Interface Editor .
In the Service Interfaces window, choose the Add Operation pushbutton or choose it from the context menu.
In the Name field, type an appropriate name for the operation. In the Documentation field, type any information about the operation you want the user to read.
Adding Parameters
Depending on the structure of your service operation, you can add one or more input and/or output parameters.
Select the service operation in which you want to add a parameter.
To add an input parameter, choose the Add Input Parameter pushbutton or select it from the context menu.
To add an output parameter, choose the Add Output Parameter pushbutton or select it from the context menu.
If your service operation is of ASYNCHRONOUS type, you can add only input parameters.
You can do the following:
Specify an appropriate name for the parameter you have added.
The SIE defines a default name for your new parameter. In case you define an invalid name for your parameter, i.e. it is duplicated, an error marker is displayed. You can see a description of the error in the Problems view of the Developer Studio.
Change the type of the parameter by choosing from list in the dropdown menu.
Change the type of the parameter by choosing the Browse pushbutton. You can:
Choose from the list of the parameter types, contained in the current XSD schema
Filter your search scope by choosing whether you want to search for parameter types in your open WSDL file ( Current Resource ), all XSD schemas and WSDL files in the current project ( Enclosed Project ) or in the whole workspace ( Workspace ). You can also search in workspaces you previously created.
Create a new parameter type by choosing the New pushbutton.
Choose a type category for the parameter type.
Enter a valid and unique name for the parameter type.
In the Documentation field, add any information about the parameter that you want the user to see
Click on the Type: link to open the Data Types Editor. For more information, see Managing Data Types .
Adding Faults
You can define a fault for exceptions that occur during the service execution. To add a fault and fault description:
Select the service operation in which you want to add a fault.
Choose Add Fault or select it from the context menu. You can define an appropriate name for the fault and in the Documentation field, add any information you want the user to see.
Editing Data Types
Open the Data Types tab page ofthe SIE.
To create a new namespace, choose the Add Namespace pushbutton and define its name.
Select the element you want to edit. In the General and Documentation sections, edit the name, type or documentation properties of the element.
For detailed information on adding and editing data types, see Managing Data Types .
Copying Elements and Data Types
You can easily copy to another namespace data types or element by selecting the element and choosing Copy from the context menu. You can copy one element at a time and paste it in any other namespace by selecting it and choosing Paste in its context menu. You can use multiple selection of elements by pressing and holding the Ctrl key and selecting the elements you want to copy.