Consuming 3rd Party Web Service in PeopleSoft
In this example we will consume a 3rd party web service in our peoplesoft system. The web service we have used is a simple calculator program having four operations – Add, Subtract, Multiply & Divide.
We are on PeopleTools 8.51.15
Before performing the steps please make sure that Integration Broker is configured - Integration Broker Setup
Step 1 – Setup Node
We have to setup a node in PeopleSoft System which will communicate with the external system.
Open the existing node WSDL_NODE.
Copy the node to be used for integration.
Step 2 – Get a Public Web Service
There are many available on the net. We will use this as an example.http://www.dneonline.com/calculator.asmx?WSDL
It is having four operations – Add, Multiply, Subtract and Divide. We will use these four operations.
Step 2 – Consume the Web Service
Navigate to PeopleTools Integration Broker Web Services Consume Web Service
Check the WSDL URL radio button and enter the WSDL.
Select the Operations that you want to use.
Give some friendly message names.
Enter the new node that we have created in the first step.
Step 4 – Enter Connection Information
Again, open the node DR_WEB_SERVICE and enter the connector id and Primary URL.
The Primary URL will be - http://www.dneonline.com/calculator.asmx
Now, ping the node to confirm that the setup is correct.
Step 5 – Provide Security
Now, search for the service operations that we have created above.Give a permission list which is assigned to your user profile.
Similarly, provide the security for other service operations.
Step 5 – PeopleCode to Use Web Service
Review the request and response message and accordingly we will create in peoplecode.
Request
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Add xmlns="http://tempuri.org/">
<intA>int</intA>
<intB>int</intB>
</Add>
</soap:Body>
</soap:Envelope>
Response
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AddResponse xmlns="http://tempuri.org/">
<AddResult>int</AddResult>
</AddResponse>
</soap:Body>
</soap:Envelope>
Create a simple page –
On the FieldChange event of Calculate button write the following peoplecode. In this example we are using ADD service operation.
Click on the Calculate button.
Request
Response
Simple and Sweet
ReplyDeletea good example
ReplyDeleteWonderful! Thanks for sharing.
ReplyDeleteGreat!, could you please share any examples using REST?
ReplyDeleteit is really excellent ....Great
ReplyDeleteVery nice explanation.
ReplyDeleteThanks a bunch!
This is very helpful! Thank you so much for sharing!
ReplyDeleteHi, I have a question, in the Step 4 – Enter Connection Information is throwing mistake: LOCAL HTTPTARGET http://www.dneonline.com/calculator.asmx Pasarela Integración - Error Contacto Sistema Externo (158,10721)
ReplyDeleteWill you know the why ? Will have something to do with the URL Connector: http://www.dneonline.com/calculator.asmx
Thanks.
Please check if the url is accessible from your web server?
DeleteHi Deepak Ray, The url is responding well from my pc.
DeleteBut when I ping the node this responds:
Información Nodo
ID Pasarela ID Conector URL Conector Texto Mensaje
LOCAL HTTPTARGET http://www.dneonline.com/calculator.asmx Pasarela Integración - Error Contacto Sistema Externo (158,10721)
This comment has been removed by the author.
ReplyDeleteHi, After eliminating everything,Try again to consume the WSDL, however the Consume Web Service wizard generate this mistake:
ReplyDeleteGateway Integration - Error External System Contact (158, 10721)
The integration gateway has not been able to contact the external system. The specified network location is likely to be erroneous or the site is temporarily or permanently unavailable.
Could you help me, regards.
can you please check the contents of errorlog.html file - /u01/PS_CFG_HOME/pt85510/webserv/HCM92DMO/applications/peoplesoft/PSIGW.war/WEB-INF
ReplyDeletealso, i hope IB setup is correct in your system.
Hi, apology for the inconvenience, I realized that from the web server I did not reach the address www.dneonline.com
ReplyDeleteAlthough from my PC I can see the WSDL and this is a security issue that is out of my hands.
Regards.
Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updatingmulesoft online training
ReplyDeleteHow to consume a wsdl which require username and password?
ReplyDeleteHi Deepak,
ReplyDeleteExcellent document on PeopleSoft web services.
Would you mind sharing your email address as I have a few questions, Thanks in advance.
Deepak: Good Information thanks for sharing.
ReplyDeleteHi Deepak, We are having difficulties as we are trying to consume web service "Cannot establish HTTP connection (158,2842)
ReplyDeleteCan be caused by any of the following:
1. Cannot load certificates due to keystore password (not encrypted).
2. Keystore file not found.
3. Proxy server not configured." any help on this is appreciated. Thanks