Skip to Content

Capturing HTTP Response Codes for WebService call

Oct 25, 2016 at 01:04 PM


avatar image
Former Member

Hi Experts,

Is there a way to capture SAOP webservice HTTP response code(like 200,401,500 etc..), here the SAOP webservice is at the receiver side and based on the response code we have multiple operations to carry.

Can you please help on how to capture the HTTP response code for a web service call.

Thanks in advance..


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Bhavesh Kantilal Nov 03, 2016 at 09:05 AM

Hello Sarat,

PI will treat any non HTTP 2XX return code as an Error Code and will make your PI Message fail.

Hence, if you get HTTP 401 - Unauthorized or HTTP 403 - Forbidden, your PI Message will go into error. Likewise if you get HTTP 500 - Internal Server Error, the message will go into error.

HTTP 200 is typically the Header code to return that the HTTP Call was successful and hence HTTP 200 is treated as a successful call by your SOAP Adapter.

The question is - why do you want to look at the header codes as this is implicitly taken care by PI. What is the end objective here or what are you trying to achieve?



10 |10000 characters needed characters left characters exceeded