Package org.pentaho.platform.util.client
Class ClientUtil
- java.lang.Object
-
- org.pentaho.platform.util.client.ClientUtil
-
public class ClientUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ClientUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.http.client.HttpClient
getClient(String userId, String password)
Returns an instance of an HttpClient.static org.dom4j.Document
getResultDom4jDocument(org.apache.http.client.HttpClient client, org.apache.http.client.methods.HttpUriRequest callMethod)
Submits an HTTP result with the provided HTTPMethod and returns a dom4j document of the response
-
-
-
Method Detail
-
getClient
public static org.apache.http.client.HttpClient getClient(String userId, String password)
Returns an instance of an HttpClient. Only one is created per ConnectionServiceClient so all calls should be made synchronously.- Returns:
- The HTTP client to be used for web service calls
-
getResultDom4jDocument
public static org.dom4j.Document getResultDom4jDocument(org.apache.http.client.HttpClient client, org.apache.http.client.methods.HttpUriRequest callMethod) throws ServiceException
Submits an HTTP result with the provided HTTPMethod and returns a dom4j document of the response- Parameters:
callMethod
-- Returns:
- Throws:
ServiceException
-
-