public abstract class CATWebService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
baseUrl |
protected java.lang.String |
password |
protected java.lang.String |
username |
Constructor and Description |
---|
CATWebService() |
CATWebService(java.lang.String username,
java.lang.String password,
java.lang.String baseUrl)
Constructor for the CATWebService object
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getErrorMsg(org.dom4j.Element errorElement)
Gets the errorMsg attribute of the CATWebService object
|
protected abstract java.lang.String |
getMethod()
Gets the method attribute of the CATWebService object
|
org.dom4j.Document |
getResponse(CATRequestConstraints constraints)
Submit a request to the CAT service and return the response as a Document
|
org.dom4j.Document |
getResponse(java.util.Map argMap)
Gets the response attribute of the CATWebService object
|
protected static void |
pp(org.dom4j.Node node)
Description of the Method
|
protected java.lang.String baseUrl
protected java.lang.String username
protected java.lang.String password
public CATWebService()
public CATWebService(java.lang.String username, java.lang.String password, java.lang.String baseUrl)
username
- username for authenticating to the CAT Web Servicepassword
- password for authenticating to the CAT Web Serviceprotected abstract java.lang.String getMethod()
public org.dom4j.Document getResponse(CATRequestConstraints constraints) throws java.lang.Exception
constraints
- constraints submitted to CAT Web Servicejava.lang.Exception
- if a response could not be obtained, or if the
response contains an error from the server.public org.dom4j.Document getResponse(java.util.Map argMap) throws java.lang.Exception
argMap
- query parameters as key/value pairsjava.lang.Exception
- if a response could not be obtained, or if the
response contains an error from the server.protected java.lang.String getErrorMsg(org.dom4j.Element errorElement)
errorElement
- error element from a CAT Service responseprotected static void pp(org.dom4j.Node node)
node
- Description of the Parameter