Question
Peter Monteiro · Feb 18

Reading the header information from a SOAP outbound adapter call

After invoking a SOAP call in a SOAP Outbound Adapter Operation, how do we get the header information? For example, the HTTP 200 response code.

In SoapUI we can read the header information, but we're trying to view it in Production.

 

Product version: IRIS 2019.2
$ZV: IRIS for Windows (x86-64) 2019.1.2 (Build 718U
0
0 141
Discussion (3)1
Log in or sign up to continue

Thanks Eduard, I understand how to do this in a http outbound but not in a SOAP one. Below is the code for the Operation. I want to get the StatusCode from pResponse. I've generated the Response class from the WSDL file and it has no properties, which is intentional.

Would I need to add a property to the response for the StatusCode?

Method BillingDocumentRequestRequestIn(pRequest As ARInvoices.Request.BillingDocumentRequestRequestInRequest, Output pResponse As ARInvoices.Response.BillingDocumentRequestRequestInResponse) As %Library.Status
{
  Set tSC = ..Adapter.InvokeMethod("BillingDocumentRequestRequestIn",,pRequest.MessageHeader,pRequest.GlobalParameters,pRequest.ActionControl,pRequest.BillableDocument)  Quit:$$$ISERR(tSC) tSC
  Set tSC = pRequest.NewResponse(.pResponse)  Quit:$$$ISERR(tSC) tSC
  Quit $$$OK
}

Using @Eduard Lebedyuk  suggestion, I implemented it like this

Method BillingDocumentRequestRequestIn(pRequest As ARInvoices.Request.BillingDocumentRequestRequestInRequest, Output pResponse As ARInvoices.Response.BillingDocumentRequestRequestInResponse) As %Library.Status
{
  Set tSC = ..Adapter.InvokeMethod("BillingDocumentRequestRequestIn",,pRequest.MessageHeader,pRequest.GlobalParameters,pRequest.ActionControl,pRequest.BillableDocument)  Quit:$$$ISERR(tSC) tSC
  Set tSC = pRequest.NewResponse(.pResponse)  Quit:$$$ISERR(tSC) tSC
  Set StatusCode = ..Adapter.%Client.HttpResponse.StatusCode
  $$$TRACE(StatusCode)
  Quit $$$OK
}