Question
4
Replies
1158
Views
Accenture India PVT Ltd
Posted: November 17, 2017
Last activity: January 20, 2019
Closed
Solved
How to pass HTTP header in Connect-SOAP
Hi All,
We have to pass our custom HTTP header in Connect-SOAP request, could you please help us in this regards.
Thanks,
Krishna M
Perform the following local-change:
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();
header.setName("CUSTOM-HEADER-1");
header.setValue("VALUE-1");
list.add(header);
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.HTTP_HEADERS, list);
client.setOptions(options);
Please go through below link for details:
https://pdn.pega.com/support-articles/how-add-http-header-connect-soap