org.pentaho.platform.util.client
Class ClientUtil

java.lang.Object
  extended by org.pentaho.platform.util.client.ClientUtil

public class ClientUtil
extends Object


Constructor Summary
ClientUtil()
           
 
Method Summary
static org.apache.commons.httpclient.HttpClient getClient(String userId, String password)
          Returns an instance of an HttpClient.
static org.dom4j.Document getResultDom4jDocument(org.apache.commons.httpclient.HttpClient client, org.apache.commons.httpclient.HttpMethod callMethod)
          Submits an HTTP result with the provided HTTPMethod and returns a dom4j document of the response
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientUtil

public ClientUtil()
Method Detail

getClient

public static org.apache.commons.httpclient.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.commons.httpclient.HttpClient client,
                                                        org.apache.commons.httpclient.HttpMethod callMethod)
                                                 throws ServiceException
Submits an HTTP result with the provided HTTPMethod and returns a dom4j document of the response

Parameters:
callMethod -
Returns:
Throws:
ConnectionServiceException
ServiceException