Forum Discussion
Stephen_Seltzer
17 years agoNew Contributor
Thanks for the suggestion but unfortunately I am still not able to get it going. When I submit my request from within soapUI, I checked the HTTP Log and saw:
The following code excerpts show where I am setting the same:
"POST /CaseGet HTTP/1.1[\r][\n]"
"Content-Type: text/xml;charset=UTF-8[\r][\n]"
"SOAPAction: "http://www.courts.state.mn.us/IS/02/CaseGetRequest"[\r][\n]"
"User-Agent: Jakarta Commons-HttpClient/3.0.1[\r][\n]"
"Host: 127.0.0.1:18080[\r][\n]"
"Content-Length: 4788[\r][\n]"
The following code excerpts show where I am setting the same:
private String executeWebService(String url, String request) {
PostMethod post = null;
try {
HttpClient client = new HttpClient();
RequestEntity requestEntity = new StringRequestEntity(request,"text/xml","UTF-8");
post = new PostMethod(url);
HttpClientParams methParams = client.getParams();
HttpVersion protoVersion = new HttpVersion(1,1);
methParams.setVersion(protoVersion);
client.setParams(methParams);
post.setRequestEntity(requestEntity);
post.addParameter("SoapAction", "http://www.courts.state.mn.us/IS/02/CaseGetRequest");
client.executeMethod(post);
InputStream responseIn = post.getResponseBodyAsStream();
}
}