
A virtual interface (VI) is the visual representation of a Web service to the outside world. Using VIs, you can define several views of the interface of an EJB and publish them separately. In a VI you can:
Hide operations and parameters
Replace names for operations and parameters with meaningful names
Set fixed values for hidden parameters
Convert parameter data types
Define parameter representation in the SOAP message
In the following sections, there is a description of how to create a Web service using the example of an EJB.
To create a VI, proceed as follows:
Choose Finish.
|
Field: |
Procedure: |
|
New Name |
Enter a new name for the parameter. |
|
New Type Name |
Choose a new data type. You can make standard conversions for primitive data types that conform to Java types. |
|
Initial value |
Check this indicator if you want to set a default value. For parameters of type String, this is empty string; for type Integer is 0, and so on. |
|
Fixed value |
Enter a specific value for the parameter in compliance with the parameter's type. |
To specify the format for SOAP messages of a Web service in detail, you can maintain SOAP extensions.
For more information on the Types tab, refer to the section Maintaining SOAP Extensions .
When you create a VI, a Web service consistency check is performed. To speed up the processing of creating a VI, you can suppress this check as follows: Select an EJB project and choose Properties, then Web Service Consistency Check from the context menu. Deactivate the consistency check by removing the tick the appropriate field.
You have created a virtual interface. It is displayed in the EJB Explorer under Virtual Interfaces:
Create a Web Service Definition .