Java Code Examples for org.jaxen.JaxenException#getMessage()

The following examples show how to use org.jaxen.JaxenException#getMessage() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractChartJrxmlHandler.java    From carbon-commons with Apache License 2.0 6 votes vote down vote up
protected void addChartReport(String chartText, String chartPlot, String chartDatasetText,
                              String chartSeriesText, String xExprtext, String yExpreText, ChartReportDTO chartReport)
        throws ReportingException {
    try {
        this.handleReportFormat();
        this.handleChartFormat(chartText);
        this.handleFields(chartText, chartReport, chartDatasetText, chartSeriesText, xExprtext, yExpreText);
        this.handleLabels(chartText, chartPlot, chartReport);
       // writeJrxmlFile(chartReport.getReportName() + ".jrxml");
        ReportingClient client = ClientFactory.getReportingClient();
        new ChartMetaDataHandler(chartReport).updateChartReportMetaData();
        client.uploadJrxmlFile(chartReport.getReportName(), getFileContent());
        Resource logo = chartReport.getReportHeaderInformation().getLogo();
        if (logo != null && logo.getFileName() != null && !logo.getFileName().equalsIgnoreCase("")) {
            if (logo.getDataHandler() != null) {
                client.uploadImage(logo.getFileName(), chartReport.getReportName(), logo.getDataHandler());
            } else {
                log.error("No data for uploaded image found...");
                throw new ReportingException("No data for uploaded image found...");
            }
        }
    } catch (JaxenException e) {
        throw new ReportingException(e.getMessage(), e);
    }

}
 
Example 2
Source File: TableTemplateJrxmlHandler.java    From carbon-commons with Apache License 2.0 6 votes vote down vote up
public void addTableReport() throws ReportingException {
    try {
        this.handleReportFormat();
        this.handleFields();
        this.handleTableBody();
        this.handleTableOutlines();
        //writeJrxmlFile(tableReport.getReportName() + ".jrxml");
        ReportingClient client = ClientFactory.getReportingClient();
        new TableReportMetaDataHandler(tableReport).updateTableReportMetaData();
        client.uploadJrxmlFile(tableReport.getReportName(), getFileContent());
        Resource logo = tableReport.getReportHeaderInformation().getLogo();
        if (logo != null && logo.getFileName() != null && !logo.getFileName().equalsIgnoreCase("")) {
            if (logo.getDataHandler() != null) {
                client.uploadImage(logo.getFileName(), tableReport.getReportName(), logo.getDataHandler());
            } else {
                throw new ReportingException("No data for uploaded image found...");
            }
        }
    } catch (JaxenException e) {
        throw new ReportingException(e.getMessage(), e);
    }
}
 
Example 3
Source File: RegistryResponseParser.java    From openxds with Apache License 2.0 5 votes vote down vote up
public String get_registry_response_status() throws XdsInternalException {
	try {
		AXIOMXPath xpathExpression = new AXIOMXPath ("@status");
		List nodeList = xpathExpression.selectNodes(response_element); 
		Iterator it = nodeList.iterator();
		if (! it.hasNext())
			throw new XdsInternalException("RegitryResponse:get_registry_response_status: Cannot retrieve /RegistryResponse/@status");
		OMAttribute att = (OMAttribute) it.next();
		return att.getAttributeValue();
	} catch (JaxenException e) {
		throw new XdsInternalException("Jaxen Exception from get_registry_response_status: " + e.getMessage());
	}
}