How to pass custom header values in Connect SOAP request
In the connect-soap service we have to pass the additional custom header values in addition to the soap envelope. In the below sample request, we need to send X-IBM-Client-value1 and X-IBM-Client-value2 in the header. Please advise if there is any option do that. We are using Pega 7.1.7 version. https:/test.com/cfg/dev-y2/v1/xxxWebService HTTP/1.1 Accept-Encoding: gzip,deflate X-IBM-Client-value1: [Valid Secret] X-IBM-Client-value2: [Valid Client] Content-Type: application/xml Content-Length: 686 Host: apiconnectdev.corp.internal.citizensbank.com Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) LMLTEST 1 TEST TEST TEST 9XXXXXX
***Updated by moderator: Lochan to add Categories***
Override the InvokeAxis2 activity to custom ruleset and add the following snippet of code in Step 7 to pass custom HTTP headers. In the below example CUSTOM-HEADER-1 is the HTTP header and VALUE-1 is the HTTP header value passed to the com.pega.apache.commons.httpclient.Header object.
com.pega.apache.axis2.client.Options options = new com.pega.apache.axis2.client.Options();
java.util.List list = new java.util.ArrayList();
com.pega.apache.commons.httpclient.Header header = new com.pega.apache.commons.httpclient.Header();