In my previous blog I showed the steps into turning a simple function module into an Enterprise Service. Now that we have the service defined in ECC, our next step is to configure it so an external application can call our newly created service.
I will show how to configure and test the Web Service on ECC with Service pack 14 and higher. Before Service Pack 14, the configuration is completed in ECC, however after SP14 the configuration is completed on the Java Stack.
Now let’s get started.
Execute the following transaction:
This will initiate a Web session and prompt you to log into the WebAS.
Once you have logged in, the next step is to locate the Enterprise Service that you created earlier.
To locate your Enterprise Service go to
Business Administrator Tab –> Web Service Administration
First we will want to find the Enterprise Service that we created. In our scenario, we named our test service as “ZTESTWEBSERVICE”. After you have found your service, you need to display it by pressing the “Apply Selection” button.
This will display the current settings for this service. Since we have not yet defined the configuration we will want to create a new service. In the Configuration tab, select “Create Service”.
Here you will see all of the different type of runtime configuration options that are available. As you can see you can configure other security and authentication options. Once you are complete, press “SAVE”.
Now you are complete. The Web Service should be up and running ready for an external application to call it. Our next step is to obtain the wsdl location and execute a test a call to the Web Service from an external application..
Testing the Web Service
Before we can test the service we will first need to get the wsdl locations. With your service displayed, go to the Overview tab.
Here you will want to click on “Open wsdl document for selected binding”
This will display the wsdl in another web session. This is the URL that needs to be given to the external application that is initiating the call. In our case, we will be using the WS Navigation tool to be doing this call. Copy this URL.
Now we have the wsdl location, we will use the WS Navigator to perform the test.
In Overview tab, select the following link:
“Open Web Service navigator for selected binding”
Here you will enter the wsdl URL that you copied in the previous step.
Then press ‘Next’
Enter a valid user that will log into ECC when calling the Web Service
Now press ‘Test’.
Here is a list of available operations to call this Service. Remember since we built it from just a function module it will only contain one operation. If we want to build an service with multiple operation we would generate this service from a function group.
For this simple example, the service will take any input and bring back a successful response.
And there you have it. You know how to turn a function module into a Web Service and test the service with WS Navigator.