Question
Ravi Akkiraju · Mar 19, 2021

Adding additional HTTP headers for SOAP client

We need to use SOAP API for some webservice. I created the request/response & operation classes via the SOAP wizard. Prior to making the invokeMethod, 

..Adapter.InvokeMethod

i need to set a custom HTTP header as part of the SOAP call. Can you please let me know how i can set that. That Adapter (EnsLib.SOAP.OutboundAdapter) class does not have methods for setting HTTP headers.

Thank you,

Ravi

 

 

Product version: IRIS 2019.1
$ZV: IRIS for UNIX (IBM AIX for System Power System-64) 2019.1 (Build 510_4_19056U) Fri Jun 28 2019 16:23:09 EDT
00
1 0 3 55
Log in or sign up to continue

Replies

Call:

set sc = ..Adapter.SetHttpHeader(name, value)

Thank you Eduard. Below is the error i am getting

ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zSetPatientPhotoOperation+2^UH.Photo.Operation.IPatientAccessMobileServices2016.1 *SetHttpHeader,EnsLib.SOAP.OutboundAdapter -- logged as '-' number - @' Set tSC = ..Adapter.SetHttpHeader("something", "someValue")'

Sorry, meant:

Do ..Adapter.%Client.SetHttpHeader(name, value)