com.inpaas.http.soap.SoapClientResponseProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of inpaas-httpclient Show documentation
Show all versions of inpaas-httpclient Show documentation
HTTP Client for REST and SOAP Services
package com.inpaas.http.soap;
import org.apache.http.HttpResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.inpaas.http.model.exception.HttpClientException;
import com.inpaas.http.utils.XML;
public class SoapClientResponseProcessor {
private static final Logger logger = LoggerFactory.getLogger(SoapClientResponseProcessor.class);
public static Object proccessResponse(HttpResponse response) throws HttpClientException {
try {
int statusCode = response.getStatusLine().getStatusCode();
logger.info("proccessResponse: {} with {} bytes", statusCode, response.getEntity().getContentLength());
return XML.parse(response.getEntity().getContent());
} catch(Throwable e) {
throw HttpClientException.unwrap(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy