In this exercise we will see how we can expose a service object class ( In our example a Function Module) as a enterprise service.
At the end of the example we should be able to view the WSDL file of our new web service from transaction SOAMANAGER.
If you are not sure of what am I talking about? Then I would recommend you to go through BC416 or quickly browse through www.w3schools.com to get an idea and then resume the exercise.
So here we go. Set your timer on!!!!
1. We would take the Function Group Z_WEB_SERVICE which has the function module Z_SQRT and expose it as an enterprise service.
2 . We will use the Web Service Wizard to generate the enterprise service definition for Function Group Z_WEB_SERVICES.
Right Click on the Function Group and choose Create -> Web Service
3. On the Provide Service Definition Details step
Provide the name of your service definition, the short description and set the endpoint as Function Group.
4 .On Choose endpoint Step.
Specify the name of the function group which will serve as the implementation for this service definition.
If you want to use Name Mapping (underscores are removed and changed to camel case) you can check the Mapping of names option.
5. Choose operations : Select the function modules.
On the Configure Service step : Leave the default profile as PRF_DT_IF_SEC_LOW
to set the lowest security level for this service definition.
Be sure to check Deploy Service. If you forget to check this box, you can complete this step later, manually from transaction code SOAMANAGER by creating an Endpoint.
On the Enter Package/Request step : Check Local object to save object as local.
On the final step choose Complete.
9. Now once you hit complete in the above step you can find the below screen where you can explore your service definition.
10. Now Goto The transaction SOAMANAGER which should launch a Web Dynpro ABAP based application in your Internet Browser. Choose the Application and Scenario Communication tab and then click on Single Service Administration.
11. Search for your Web Service Definition
12 . When you click the Open WSDL Document for selected binding or service link a new browser windows will open with the WSDL Document.
Hooray, The Final WSDL File is now available.