cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a web service from UDF

sateesh437
Participant
0 Kudos

Hi Experts,

We have a scenario where we need to get the information from the web service (which invokes method in it) and that information we need to send again to the same web service (which need to invoke another method).

I got to know like we can achieve this by calling the web services from UDF, please let me know how to call web services from UDF and necessary actions performed before that.

I have received the web service URL with HTTPS protocol from the customer and which contains multiple methods.

when we using HTTPS do we need to perform any settings in our system NWA, we are using SAP PO 7.4 single stack.

Scenario:

  1. ECC sends login information through proxy to SAP PO  and we need to invoke the Login method in third party web service then we will get some Session ID.
  2. With the above session id we need to the some other method in the same web service we will get some information.
  3. Output of the second step we need to pass to the another method of the same web service and need to get the response.
  4. Output of the third step we need to pass back to ECC.

Kindly help me in providing the necessary solutions to achieve this.

Regards,

Sateesh.

Accepted Solutions (0)

Answers (4)

Answers (4)

bhavesh_kantilal
Active Contributor
0 Kudos

Quick question : Are you on a PO 7.4 server or on a PI 7.4 Single Stack Server?

If PO 7.4 -> Ideal way to do this kind of orchestration is using a BPM.

If PI 7.4 Single Stack -> then

  • Use the UDF to connect and get the sessionID.
  • Use this to form the next request and make call to second webservice etc.
  • In terms of NWA set up as you use the SOAP Adapter with the SOAP Lookup API, you need to make sure that the corresponding Webservice providers Certificates are loaded into the TrustedCAs in your keystore.

Regards

Bhavesh

sateesh437
Participant
0 Kudos

Hi Bhavesh,

I din't have knowledge in BPM

could you please let me know how to do using nwBPM.

Regards,

Sateesh.

Former Member
0 Kudos

Hi Sateesh,

Could please me help me on this scenario as below.

Proxy -- SAP PI -- 3rd Party

Sender is a Proxy, Receiver is a SOAP

before Sending the actual payload, i need to get the session ID using the login credentials into that 3rd party, and that session id need to pass in SOAP header with actual payload.

Could you please help me get the UDF's

Thank you,

Aravind

nitindeshpande
Active Contributor
0 Kudos

Hi Sateesh,

This seems to be a very complex requirement and AFAIK this is not possible using UDF. You need to go for BPM for this, because you have to make multiple web-service calls.

For calling the particular method, you need to put the method name in the SOAP Action field.

For enabling the HTTPS, please follow the below blog and take help of your Basis team to do this -

After this you need to upload the certificates of your 3rd party (web-service) into TrustedCAs Keystore view in NWA of SAP PI system, for this follow the below blog -

Regards,

Nitin

0 Kudos

Hi Sateesh,

You can refer the below link as a reference and check whether it can fulfill your requirement,

Regards,

Praloy

anupam_ghosh2
Active Contributor
0 Kudos

Hi Sateesh,

                  First call the webservice from UDF to obtain session id. Please follow this wonderful blog by Bhavesh Kantilal. on how to to so.

After you obtain the session id make subsequent calls from the same UDF and return response to ECC.

Regards

Anupam

sateesh437
Participant
0 Kudos

Hi Anupam,

Thanks for your reply..!

As it is an HTTPS URL and third party web service, do we need to do any additional settings in NWA or anywhere?

Thanks,

Sateesh.

anupam_ghosh2
Active Contributor
0 Kudos

What is the kind of web service? Is this SOAP or REST? In case of HTTPS you need to check if there is a proxy server or firewall sitting between PI server and the web service. There is no other special setting you need to take care.

Regards

Anupam