Question
· Feb 1

SOAP Services: how HTTP status code are handled?

Hello,

First of all thanks for your time, and thanks for your help.

We have the following doubt: how HTTP status is being replied from a SOAP Service to the Outbund System?

Where in HealtShare 2020's classes is being replied an HTTP/200 OK or an HTTP/500 or any SOAP HTTP status code?

We ask this because some outbound systems do need to have an HTTP 200 to being able to process our SOAP responses.

We have been examining the following classes:

EnsLib.SOAP.Service

%SOAP.WebService

%SOAP.WebBase

We have also read:

https://docs.intersystems.com/irisforhealthlatest/csp/documatic/%25CSP.D...

 

We ask this because we are wondering why sometimes SOAP Services do respond "HTTP/1.1 200 OK" and other times don't, and how we could debbug this inside the code and/or know what exact HealthShare's code does it for SOAP Services. 🧑‍🏫👩‍🏫❓👩‍🏫🧑‍🏫

Thanks for your help, time,

and thanks for your replies.

Discussion (2)2
Log in or sign up to continue

I am pretty sure that most pathways lead to the makeStatusFault function of the %SOAP.WebService class. It seems most likely that the path leading you there based on what you are digging into above is OnPreSoap function of EndLib.SOAP.Service class. 

Personally I used the generic soap class so the status is typically set in the OnProcessInput. 

As far as troubleshooting goes, I updated one setting at a time and played messages through Postman (an app for API and HTTP simulation) to determine how that affected the HTTP Responses. There are ways to adjust these settings in custom in soap services and business processes depending on where this process would make the most sense.

You can learn more about custom SOAP Faults here which I think is more like what you are looking for: 
https://docs.intersystems.com/irisforhealth20241/csp/docbook/DocBook.UI....

I hope this was a little helpful!