Start of Content Area

Procedure documentation Creating a Web Service for a Java Class  Locate the document in its SAP Library structure

Use

Java classes can be provided as Web services.

Prerequisites

You have:

·        Created a Java class in the Java perspective.

·        Read the section Restrictions for WS Endpoints.

·        Created a DC component. For more information, see The Development Process.

·        Read the section Writing ABAP-Compliant Web Services (if appropriate).

Procedure

Öffnen...

Select the class in the Java Explorer in the Web Service Perspective, then call the Web Service Creation Wizard by choosing New Web Service. Follow the procedure in Web Service Creation Wizard.

If you want to specify the features of the Web service yourself, proceed as follows:

       1.      Select the class in the Java Explorer in the Web Service Perspective, and choose New Virtual Interface from the context menu. For more information, refer to the section Creating a Virtual Interface.

       2.      Select the VI and choose New Web Service Definition. For more information, refer to the section Creating a Web Service Definition.

       3.      Select the project and choose New Web Service Deployment Descriptor. On the right, you see the WS Deployment Descriptor Editor.

       4.      Select the node for the deployment descriptor and choose Add. Choose the WSD on which the Web service is to be based. Enter a name for the Web service. 

       5.      Add a WS configuration. Select the generated node for the Web service (under Web Service Configurations) and choose Add. Enter the necessary data. Choose the appropriate transport binding.

Note

Several configurations can be created for each Web service. The transport binding is the same for all configurations. You can only choose it when you create the first configuration.

For information on the transport binding Soap with Attachments, see Creating a Web Service with Attachments.

       6.      Define the WS configuration. Click the subnode of the WS configuration and make the appropriate settings.

Follow the steps given in the section Creating a Web Service and Web Service Configuration.

       7.      Save your entries.

       8.      Select this EAR project and choose Build Ear from the context menu. An EAR file is created.

       9.      Deploy the EAR file. Select it, and then choose Deploy in the context menu.

You can publish a Web service in the UDDI. For more information, see Publishing a Web Service as a Business Service.

To incorporate the Web service, you can create a deployable or a standalone proxy. For more information, refer to the section Consuming a Web Service.

 

End of Content Area