String msg = "Internal error while accessing node '" + ex.getMessage() + "'."; throw new XMLParsingException( this, contextNode, msg );
throw new AxisFault(e.getMessage()); } catch (OMException e) { throw new AxisFault(e.getMessage()); } catch (FactoryConfigurationError e) { throw new AxisFault(e.getMessage());
throw new AxisFault(e.getMessage()); } catch (OMException e) { throw new AxisFault(e.getMessage()); } catch (FactoryConfigurationError e) { throw new AxisFault(e.getMessage());
public String getNodeAsString( OMElement context, XPath xpath, String defaultValue ) throws XMLParsingException { String value = defaultValue; Object node = getNode( context, xpath ); if ( node != null ) { try { if ( node instanceof OMText ) { value = ( (OMText) node ).getText(); } else if ( node instanceof OMElement ) { value = ( (OMElement) node ).getText(); } else if ( node instanceof OMAttribute ) { value = ( (OMAttribute) node ).getAttributeValue(); } else { String msg = "Unexpected node type '" + node.getClass() + "'."; throw new XMLParsingException( this, context, msg ); } } catch ( OMException ex ) { String msg = "Internal error while accessing node '" + ex.getMessage() + "'."; throw new XMLParsingException( this, context, msg ); } } return value; }
/** * Initializes this <code>XMLAdapter</code> with the content from the given <code>StringReader</code>. Sets the * SystemId, too. * * @param reader * source of the XML content * @param systemId * can not be null. This string should represent a URL that is related to the passed reader. If this URL * is not available or unknown, the string should contain the value of XMLFragment.DEFAULT_URL * * @throws XMLProcessingException */ public void load( StringReader reader, String systemId ) throws XMLProcessingException { try { if ( systemId == null ) { throw new NullPointerException( "'systemId' must not be null!" ); } setSystemId( systemId ); XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader( reader ); StAXOMBuilder builder = new StAXOMBuilder( parser ); rootElement = builder.getDocumentElement(); } catch ( XMLStreamException e ) { throw new XMLProcessingException( e.getMessage(), e ); } catch ( OMException e ) { throw new XMLProcessingException( e.getMessage(), e ); } catch ( FactoryConfigurationError e ) { throw new XMLProcessingException( e.getMessage(), e ); } }
throw new AxiomSoapMessageCreationException("Could not create message: " + ex.getMessage(), ex);
throw new AxiomSoapMessageCreationException("Could not create message: " + ex.getMessage(), ex);
throw new AxiomSoapMessageCreationException("Could not create message: " + ex.getMessage(), ex);
throw new AxiomSoapMessageCreationException("Could not create message: " + ex.getMessage(), ex);
} catch (OMException ex) { handleDeploymentError("Deployment of synapse artifact failed. Error parsing " + filename + " : " + ex.getMessage(), ex, filename);
+ this.response.getStatusLine().getStatusCode() + " HTTP status : " + this.response.getStatusLine().getReasonPhrase() + " exception : " + e.getMessage();
} catch (OMException ex) { handleDeploymentError("Deployment of synapse artifact failed. Error parsing " + filename + " : " + ex.getMessage(), ex, filename); throw new DeploymentException(ex);
throw new AxiomSoapMessageException("Could not write message to OutputStream: " + ex.getMessage(), ex);
throw new AxiomSoapMessageException("Could not write message to OutputStream: " + ex.getMessage(), ex);
throw new AxiomSoapMessageException("Could not write message to OutputStream: " + ex.getMessage(), ex);
throw new AxiomSoapMessageException("Could not write message to OutputStream: " + ex.getMessage(), ex);
} catch (OMException e) { handleException("Error during retrieving the Doument Node as the result " + e.getMessage(), e);