Introduction I read Renald Wittwer very nice weblog this morning on how to Develop a Web Service that sends an Email. The author gave a very complete walkthrough of how to create this Web Service in the WebAS Java Personality. I thought it might be fun and interesting to take the exact same example in recreate it in ABAP as a WebService. Please note that this example is from a WebAS 640 system and uses new functionality that is only available as of 640.
Create an ABAP Function Module 1. Go to SE80. 2. Create a new RFC enabled Function Module
3. Importing Parameters
4. Exporting Parameters
5. Program Coding
Create a Virtual Interface 1. From SE80 Choose other Object 2. Go to the Enterprise Services Tab 3. Choose Virtual Interface, enter a name, and then hit create
4. Fill in the Virtual Interface Parameters, linking it to the function module we just created.
5. We now have our generated Virtual Interface
Create a WebService Definition 1. From SE80 Choose Other Object 2. Go to the Enterprise Services Tab 3. Choose Web Service Definition, enter a name, and then hit create
4. Fill in the Web Services Parameters, linking it to the Virtual Interface we just created.
5. We can now set our Features for this WebService. However for this example we will keep everything at the defaults.
6. Optionally, we can also publish our WebService into an external UDDI server at this point.
Releasing our WebService 1. Now we are ready to go to Transaction WSCONFIG to release our Web Service Definition.
Testing our WebService 1. We can now go to transaction WSADMIN to view the WSDL file or test our WebService.
2. We can also call our WebService from another programming tool. In the screen shot below we see it in use in Visual Studio .Net.