Package com.esri.gpt.catalog.harvest.clients.exceptions

Examples of com.esri.gpt.catalog.harvest.clients.exceptions.HRInvalidResponseException


    throw new HRInvalidUrlException("Invalid URL: " + getHostUrl(), ex);
  } catch (SocketTimeoutException ex) {
    throw new HRTimeoutException(
      "Timeout of " + getTimeout() + " milliseconds exceeded.", ex);
  } catch (IOException ex) {
    throw new HRInvalidResponseException("Error reading response.", ex);
  }
}
View Full Code Here


    throw new HRTimeoutException(
      "Timeout of " + getTimeout() + " milliseconds exceeded.", ex);
  } catch (ConnectException ex) {
    throw new HRInvalidUrlException("Invalid URL: " + getHostUrl(), ex);
  } catch (IOException ex) {
    throw new HRInvalidResponseException("Error reading response.", ex);
  }
}
View Full Code Here

  try {
    BufferedReader reader = new BufferedReader(new InputStreamReader(response));
    reader.readLine();
    reader.close();
  } catch (IOException ex) {
    throw new HRInvalidResponseException("Invalid response.", ex);
  }
}
View Full Code Here

    Document document = DomUtil.makeDomFromSource(source, false);

    XPath xPath = XPathFactory.newInstance().newXPath();
    if (((Node) xPath.evaluate(
      "/OAI-PMH/Identify", document, XPathConstants.NODE)) == null) {
      throw new HRInvalidResponseException("Not OAI response.");
    }

  } catch (XPathExpressionException ex) {
    throw new HRInvalidResponseException("Error parsing response.", ex);
  } catch (SAXException ex) {
    throw new HRInvalidResponseException("Error parsing response.", ex);
  } catch (ParserConfigurationException ex) {
    throw new HRInvalidResponseException("Error parsing response.", ex);
  } catch (IOException ex) {
    throw new HRInvalidResponseException("Error parsing response.", ex);
  } finally {
    try {
      response.close();
    } catch (IOException ignore) {
    }
View Full Code Here

  try {
    BufferedReader reader = new BufferedReader(new InputStreamReader(response));
    reader.readLine();
    reader.close();
  } catch (IOException ex) {
    throw new HRInvalidResponseException("Invalid response.", ex);
  }
}
View Full Code Here

    Document document = DomUtil.makeDomFromSource(source, false);
    XPath xPath = XPathFactory.newInstance().newXPath();
   
    if ( ((Node) xPath.evaluate(
      "/Capabilities", document, XPathConstants.NODE))==null) {
      throw new HRInvalidResponseException(
        "Received response has no 'Capabilities' node.");
    }
   
    Node recordsNode = (Node) xPath.evaluate(
        "/Capabilities/OperationsMetadata/Operation[@name=\"GetRecords\"]",
        document, XPathConstants.NODE);
    Node recordByIdNode = (Node) xPath.evaluate(
        "/Capabilities/OperationsMetadata/Operation[@name=\"GetRecordById\"]",
        document, XPathConstants.NODE);

    if (recordsNode==null || recordByIdNode==null) {
      throw new HRInvalidResponseException(
        "Received response has either no 'GetRecords' node," +
        " or no 'GetRecordById' node.");
    }
  } catch (XPathExpressionException ex) {
    throw new HRInvalidResponseException("Error parsing response.", ex);
  } catch (SAXException ex) {
    throw new HRInvalidResponseException("Error parsing response.", ex);
  } catch (ParserConfigurationException ex) {
    throw new HRInvalidResponseException("Error parsing response.", ex);
  } catch (IOException ex) {
    throw new HRInvalidResponseException("Error parsing response.", ex);
  } finally {
    try {
      response.close();
    } catch (IOException ignore) {
    }
View Full Code Here

        HRInvalidProtocolException.ProtocolElement.serviceName,
        "Requested service unaccessible."
        );
    }
  } catch (ImsResponseException ex) {
    throw new HRInvalidResponseException(
      "Invalid response received from the host", ex);
  } catch (ImsServiceException ex) {
    handleImsServiceException(ex);
  }
}
View Full Code Here

    throw new HRInvalidUrlException("Invalid URL: " + getHostUrl(), ex);
  } catch (SocketTimeoutException ex) {
    throw new HRTimeoutException(
      "Timeout of " + getTimeout() + " milliseconds exceeded.", ex);
  } catch (IOException ex) {
    throw new HRInvalidResponseException("Error reading response.", ex);
  }
}
View Full Code Here

    throw new HRTimeoutException(
      "Timeout of " + getTimeout() + " milliseconds exceeded.", ex);
  } catch (ConnectException ex) {
    throw new HRInvalidUrlException("Invalid URL: " + getHostUrl(), ex);
  } catch (IOException ex) {
    throw new HRInvalidResponseException("Error reading response.", ex);
  }
}
View Full Code Here

    try {
      BufferedReader reader = new BufferedReader(new InputStreamReader(response));
      reader.readLine();
      reader.close();
    } catch (IOException ex) {
      throw new HRInvalidResponseException("Invalid response.", ex);
    }
  }
View Full Code Here

TOP

Related Classes of com.esri.gpt.catalog.harvest.clients.exceptions.HRInvalidResponseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.