Monday, August 12, 2019

Integration Broker - SOAP Web Services

Question from PeopleSoft General Discussion forum:
"I am looking for an example of where I can submit a Synchronous message that includes SOAP ACTION in header and body..."

Refer: https://community.oracle.com/message/15427975

If we want an example of how we need to invoke a PeopleSoft SOAP web service, we can start by using the 'Generate SOAP Template' feature within Integration Broker.

Generate SOAP Template from the Service Definition

There is an option on the Service Definition page to "Generate SOAP Template" messages. This will give us an idea of how to construct the request message.


Notes
  • I like the fact that template message includes the <soapenv:Header> information. This is particularly helpful because if we load the web service into SoapUI and generate a sample/new REQUEST, it does not include the SOAP header in the XML window/view.



  • If we ever decide to copy the template SOAP Request Message from PIA page and paste it into SoapUI, we will more than likely run into the following error.
Error: Integration Gateway failed while processing the message


This is because the PIA page contains additional HTML markup - used to display the formatted SOAP message, which pollutes the actual XML contents as we can see below.


We can overcome this issue by using the 'Invoke Service Operation' button on the 'SOAP Message Template' page and copying the REQUEST contents from the editable textarea in the SOAP Tester page.


  • While I like the fact that the REQUEST message contains the necessary SOAP header with the WS-Security information, I don't really like that it is also included in the RESPONSE message. I cannot think of any use case where the WS-Security will be part of a SOAP RESPONSE message.


Using HTTP Log in SoapUI

There is a fantastic feature within SoapUI which provides the entire HTTP log of the web service request/response. This is very handy to understand where the message is POSTed (basically all SOAP transactions are HTTP POST requests with a "SOAPAction" header); and to see the headers in the HTTP request and the entire response including HTTP status code, etc.



I thought I would share these utilities because I use them a lot to provide details to anyone who is consuming a PeopleSoft SOAP web service.

1 comment:

  1. Hi Sasank. Thank you for sharing such a valuable information. I request, it would be helpful, if you can share how to invoke the above service operation through peoplecode where we can share parameter values in header and body. Thank you so much once again

    ReplyDelete