-
content-type
Hi.
I have trapped a webservice request with tcpmon. It looks like this:
Code:
POST /TestService/services/WebserviceTransaction HTTP/1.1
Accept-Encoding: gzip
SOAPAction: ""
Content-Type: text/xml
User-Agent: Jakarta Commons-HttpClient/3.0
Host: ....
Content-Length: 851
<?xml version="1.0" encoding="ISO-8859-1"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<pit:Service1 xmlns:pit="TestService">
<Header>
</Header>
<TestService1>
</TestService1>
</pit:Service1>
</soapenv:Body></soapenv:Envelope>
The problem is that I want the content-type to be like "Content-Type: text/xml; charset=ISO-8859-1"
How do I set this in my configuration??
I have tried the following but that help me neither:
Code:
HttpClient client = new HttpClient();
HttpClientParams clientParams = new HttpClientParams();
clientParams.setContentCharset("ISO-8859-1");
clientParams.setCredentialCharset("ISO-8859-1");
clientParams.setHttpElementCharset("ISO-8859-1");
client.setParams(clientParams);
CommonsHttpMessageSender messageSender = new CommonsHttpMessageSender(client);
getWebserviceTemplate().setMessageSender(messageSender);
Thanks in advance. :)