Web Service – Service Provider

If third party wants to access / validate / retrieve some data from SAP then we can provide them RFC. There are some middleware like TIBCO which can consume RFC and provide the details to third party. Third party systems directly can access ERP System using Web Service.

Suppose there is a scenario, there is some portal to sell Jio Phones and Phones will have some Material, Serial and IMEI Numbers that needs to be validated from SAP System. In such scenarios, we can provide Web Service / WSDL file to third party system.

To validate the details, we will be getting Material, Serial and IMEI Numbers as input, and have to provide Material, Description and success flag.

First, we need to create one RFC with required Importing/Exporting Parameters.

Importing Parameters:

1

Exporting Parameters:

One RFC is created → Go to Utilities → More Utilities → Create Web Service → From Function Module

Enter Definition Name and Description → Continue

Click on Next.

In below screen, if we will select ‘No Authentication and No Transport Guarantee’ then User ID and Password needs to be maintained in SOAMANAGER (Credentials are required to hit SAP System) and the Service will become open to all which is not advised. Here I have selected ‘Authentication with User ID and Password and Transport Guarantee’.

Provide Package & TR Details

Click on Next and Activate the Definition.

In WSDL Tab, we can see the file but it will not have the Endpoint and port details.

In Test Client, SOAMANAGER Configuration is required.

Go to the TCode: SOAMANAGER in Test client → Select Service Definition → Enter Definition name: Z_IMEI_VALIDATE → Press Enter

Go to Configuration tab → Click on Create

Enter Service Name & Description → Apply Settings

In Provider Security Tab: to provide HTTP request select ‘None’ and for HTTPS request select ‘SSL (HTTPS, Transport Channel Security)’ in Communication Security tab. Select the options as per your requirement.

Then → Save. It will generate Calculated Access URL

Now move to ‘Details of Service Definition’ → Click on ‘Open WSDL document for selected binding or service’ to get the WSDL file for the created Service from RFC.

Scroll down for the Endpoint:

Save this WSDL file and before sending this WSDL to third party, it should be tested at our end.

SoapUI can be used to test the WSDL File.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s