//Construct the soapmessage from http response
SOAPMessage soapMessage = null;
if (responseCode == HttpURLConnection.HTTP_OK) {
try {
//read http headers & load mimeheaders
MimeHeaders mimeHeaders = new MimeHeaders();
String key, value;
// skip status line
int i = 1;
while (true) {
key = httpCon.getHeaderFieldKey(i);
value = httpCon.getHeaderField(i);
if (key == null && value == null) {
break;
}
if (key != null) {
StringTokenizer values = new StringTokenizer(value, ",");
while (values.hasMoreTokens()) {
mimeHeaders.addHeader(key, values.nextToken().trim());
}
}
i++;
}
InputStream httpInputStream;