Class CATWebService

java.lang.Object
org.dlese.dpc.serviceclients.cat.CATWebService
Direct Known Subclasses:
GetAllStandardsDocuments, GetStandard, SuggestStandards

public abstract class CATWebService extends Object
Author:
Jonathan Ostwald
  • Field Details

    • baseUrl

      protected String baseUrl
    • username

      protected String username
    • password

      protected String password
  • Constructor Details

    • CATWebService

      public CATWebService()
    • CATWebService

      public CATWebService(String username, String password, String baseUrl)
      Constructor for the CATWebService object
      Parameters:
      username - username for authenticating to the CAT Web Service
      password - password for authenticating to the CAT Web Service
  • Method Details

    • getMethod

      protected abstract String getMethod()
      Gets the method attribute of the CATWebService object
      Returns:
      The method value
    • getResponse

      public org.dom4j.Document getResponse(CATRequestConstraints constraints) throws Exception
      Submit a request to the CAT service and return the response as a Document
      Parameters:
      constraints - constraints submitted to CAT Web Service
      Returns:
      The response value
      Throws:
      Exception - if a response could not be obtained, or if the response contains an error from the server.
    • getResponse

      public org.dom4j.Document getResponse(Map argMap) throws Exception
      Gets the response attribute of the CATWebService object
      Parameters:
      argMap - query parameters as key/value pairs
      Returns:
      The response value
      Throws:
      Exception - if a response could not be obtained, or if the response contains an error from the server.
    • getErrorMsg

      protected String getErrorMsg(org.dom4j.Element errorElement)
      Gets the errorMsg attribute of the CATWebService object
      Parameters:
      errorElement - error element from a CAT Service response
      Returns:
      The errorMsg value
    • pp

      protected static void pp(org.dom4j.Node node)
      Description of the Method
      Parameters:
      node - Description of the Parameter