In this part, we’ll see the process to create Proxy consumer service.
Previously, we have seen how to create an ABAP based web service
First, we have to start the wizard to create a new service using trx. SE80. Right click and then Create->Enterprise Service.
This time, in Object Type field we choose Service Consumer:
For the Service Consumer source, we can choose amongst Enterprise Service Repository, URL or the path of WSDL a local file, UDDI, and the Service Registry.
Please select URL/HTTP Destination.
Fill with the URL of the WSDL previously created.
Before continue, we enter to SOAMANAGER transaction code and choose: Application and Scenario Communication ->Single Service Administration.
Search the Service previously created and choose “Apply Selection”. Now we can see the Service Definition details.
You have to click on the “Open Web Service navigator for Selected Binding” link. The combo button shows the Endpoint defined for the Service. It’ll pop up the WSDL where we have to take the URL to create the proxy.
Use the URL in the wizard:
Fullfil the necesary data in the wizard.
In final step, you can click on “Complete” to start the creation of the Proxy object.
Enter your login data:
The proxy class is shown. Click on “Save and Activate”.
Go back to the SOAMANAGER trx. to configurate a logical port for our service provider.
Logical ports are made to configurate the time features of a WS execution. We can create a logical port from LPCONFIG (obsolete) or SOAMANAGER as we are showing next.
A consumer proxy never stores details about a server URL (which is system specific). These details have to be configured through logical ports and EndPoints.
For example: when we transport a proxy class from a Development system to QA system. The proxy class doesn’t contain any information about which server the WS has to be called, this is handled by a logical port-.
Go back to the SOAMANAGER trx. This time, when you search in “Web Service Administration” choose “Consumer Proxy”. Don’t forget to click on “Apply Selection”a after highlighting the proxy.
In the Configuration tab, select “Create Logical Port”.
In the pop-up shown, you have to fill several parameters. First, give a name for the logical port and set it as the default logical port.
Next we have to select “Config. Type” based on WSDL.
The application reads all the security parameters needed to call this service directly from WSDL definition.
Finally, we have to fill the WSDL URL for the called Web Services. Also, you have to give the system user name and password to access the WSDL
If the creation was success, the system will take us back to the Config. Screen, where we can continue with the logical port configuration. Once more, introduce the user name and password (they are going to be used as a credentials to call this service and to save the logical port).
The next and final section is: Testing a Service Consumer Proxy: