I need to send a custom HTTP header (not soap header) field in the Connect-Soap request for example Client_id. I see many similar articles refer to the below article which doesn’t have access to me (You are not authorized to access this page.)
@Brahmesh@ - I think you will need to overwrite the invokeaxis2 activity into your ruleset to add the custom http headers. Please check whether invokeaxis or invokeaxis2 activity is called for your connector and modify it accordingly.
@NagasaiP7319 I managed to customize the InvokeAxis2 activity for adding a custom HTTP header.
Added below code at step#7.
In my case, I need to pass custom HTTP header only for few soap api calls so need to control them using parameters that being passed/defined from request data transform of connect-SOAP and also parameterized the header name and value.
String IsUseNewAPIGateWay= tools.getParamValue(“IsUseNewAPIGateWay”); if(IsUseNewAPIGateWay==“true”){ java.util.List list = new java.util.ArrayList(); com.pega.apache.commons.httpclient.Header header = new com.pega.apache.commons.httpclient.Header(); header.setName(tools.getParamValue(“Custom_httpheader_1”)); header.setValue(tools.getParamValue(“Custom_httpheader_1_Value”)); list.add(header); options.setProperty(com.pega.apache.axis2.transport.http.HTTPConstants.HTTP_HEADERS, list);
}