public class WebServiceCaller
extends java.lang.Object
Constructor and Description |
---|
WebServiceCaller() |
Modifier and Type | Method and Description |
---|---|
protected WsResponseObject |
executeMethod(org.apache.http.client.methods.HttpPost method,
org.apache.http.client.protocol.HttpClientContext context,
javax.net.ssl.SSLContext sslContext)
executes the given method using provided http client.
|
protected org.apache.http.client.methods.HttpPost |
getMethodToExecute(WsRequestObject request)
Creates method to be execute for webservice call.
|
protected java.util.Map<java.lang.String,java.lang.String> |
getResponseHeadersMap(org.apache.http.HttpResponse response) |
WsResponseObject |
performCall(WsRequestObject request)
Performs a web service call.
|
protected WsResponseObject |
processError(java.lang.Exception error)
Process error which occured during the webservice call.
|
protected org.apache.http.client.protocol.HttpClientContext |
setupAuthentication(org.apache.http.client.methods.HttpPost method,
WsRequestObject request)
Setup authentication for the given method and http client.
|
protected org.apache.http.client.methods.HttpPost getMethodToExecute(WsRequestObject request) throws java.io.UnsupportedEncodingException
request
- java.io.UnsupportedEncodingException
protected WsResponseObject executeMethod(org.apache.http.client.methods.HttpPost method, org.apache.http.client.protocol.HttpClientContext context, javax.net.ssl.SSLContext sslContext) throws java.io.IOException
method
- context
- sslContext
- java.io.IOException
java.lang.IllegalArgumentException
- if the response content type is not "text/xml"protected org.apache.http.client.protocol.HttpClientContext setupAuthentication(org.apache.http.client.methods.HttpPost method, WsRequestObject request)
method
- request
- public WsResponseObject performCall(WsRequestObject request)
request
- protected WsResponseObject processError(java.lang.Exception error)
error
- protected java.util.Map<java.lang.String,java.lang.String> getResponseHeadersMap(org.apache.http.HttpResponse response)
response
- Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.