Posted: 17 Dec 2018 16:08 EST Last activity: 6 Feb 2019 4:22 EST
how to pass custom http header values in a SOAP service call
Hi All, I have a requirement where i need to pass 4 different custom http header values to different SOAP calls. I went through below article but it doesnt mention where exactly we need to include the provided snippet in invoke-axis 2 acitvity(Step 7) and also the article suggests to hardcode the header values. Is there a way where we can achieve the above requirement without hardcoding values?
I believe, you can use Local variables in InvokeAxis2 activity and refer the local variable name rather than hard coded values in the code (in Step-7 of InvokeAxis2 activity). So that you can pass the dynamic values to header(s) and their corresponding values in the form of Local variable from the caller rule of InvokeAxis2 activity.
instead of below code:
com.pega.apache.axis2.client.Options options = new com.pega.apache.axis2.client.Options();
com.pega.apache.commons.httpclient.Header header = new com.pega.apache.commons.httpclient.Header(); header.setName("CUSTOM-HEADER-1");