Question

46
Views
Brahmeswara Rao (Brahmesh@)
Capgemini
Developer
Capgemini
SE
Brahmesh@ Member since 2013 154 posts
Capgemini
Posted: February 25, 2021
Last activity: March 1, 2021
Posted: 25 Feb 2021 15:56 EST
Last activity: 1 Mar 2021 15:44 EST

How to add Charset to HTTP Request header of Connect-Soap

We need to pass charset in request header instead request body.

 

request_body    

<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header><ns

we would like to define the "Content-Type" : text/xml;charset=UTF-8 in request http header but not sure how content-type is being initialized for connect-soap 

 request_http_headers      

{ "Content-Type": "text/xml" }, { "SOAPAction": "\"\"" },

 

 

i tried to use below code snippet in InvokeAxis2 ( step#7) but it didn't work.

 

We need to pass charset in request header instead request body.

 

request_body    

<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header><ns

we would like to define the "Content-Type" : text/xml;charset=UTF-8 in request http header but not sure how content-type is being initialized for connect-soap 

 request_http_headers      

{ "Content-Type": "text/xml" }, { "SOAPAction": "\"\"" },

 

 

i tried to use below code snippet in InvokeAxis2 ( step#7) but it didn't work.

 

com.pega.apache.commons.httpclient.Header CustomerHTTPHeader=new com.pega.apache.commons.httpclient.Header("Content-Type","charset=UTF-8");                     java.util.List list=new java.util.ArrayList();                     list.add(CustomerHTTPHeader);                     options.setProperty(com.pega.apache.axis2.transport.http.HTTPConstants.HTTP_HEADERS, list);

Pega Platform 7.3.1 System Administration Data Integration Financial Services