Package com.volantis.xml.pipeline.sax

Examples of com.volantis.xml.pipeline.sax.XMLPipelineException


                retrieveConfiguration(WSDriverConfiguration.class);

        if (configuration == null) {
            // cannot get hold of the configuration. As this is fatal
            // deliver a fatal error down the pipeline
            XMLPipelineException error = new XMLPipelineException(
                    "Could not retrieve the Web Service configuration",
                    context.getCurrentLocator());

            try {
                pipeline.getPipelineProcess().fatalError(error);
View Full Code Here


            Operation operation =
                    (Operation)context.getProperty(Operation.class);
            if (operation == null) {
                String errorMessage =
                        "Could not find the operation for this request";
                fatalError(new XMLPipelineException(errorMessage, locator));
            }

            Message message = (Message)context.getProperty(Message.class);
            if (message == null) {
                String errorMessage =
                        "Could not find the message for this request";
                fatalError(new XMLPipelineException(errorMessage, locator));
            }

            InputSource wsdlInputSource = null;
            try {
                wsdlInputSource = acquireWSDLInputSource(operation);
            } catch (IOException e) {
                e.printStackTrace();
                fatalError(new XMLPipelineException(
                        e.getMessage(), locator, e));
            }

            if (wsdlInputSource == null) {
                // It should usually not be the case that wsdlInputSource is
                // null, though can happen if the WSDL acquisition times out
                // for example.
                // @todo later for some reason this can cause a flow control failure if the operation is surrounded by a try operation
                fatalError(new XMLPipelineException(
                        "wsdlInputSource is null", locator));
            }

            try {
                Message result =
                        WebServiceInvoker.invokeWebService(wsdlInputSource,
                                                           operation,
                                                           message);
                forwardMessageAsXML(result);
            } catch (Exception e) {
                fatalError(new XMLPipelineException(
                        e.getMessage(), locator, e));
            }
        }
    }
View Full Code Here

        dynamicProcess.removeProcess(process);

        if (!context.inErrorRecoveryMode()) {
            Object popped = context.popObject();
            if (popped != model) {
                XMLPipelineException error = new XMLPipelineException(
                        "Expected to remove object " + model +
                        "from the pipeline, but actually removed " + popped,
                        context.getCurrentLocator());
                // send the error down the pipeline
                dynamicProcess.fatalError(error);
View Full Code Here

                } catch (ExpressionException e) {
                    // something went wrong when evaluating the xpath.
                    // Send an error down the pipeline
                    Locator locator = pipelineContext.getCurrentLocator();
                    XMLPipelineException se = new XMLPipelineException(
                            "Could not evaluate the expression " +
                                    value,
                            locator,
                            e);
View Full Code Here

        SAXParseException x = getException(context);
        ExpressionFactory factory = context.getFactory();
        Value result = Sequence.EMPTY;

        if (x instanceof XMLPipelineException) {
            XMLPipelineException pipelineException = (XMLPipelineException) x;
            String codeName = pipelineException.getErrorCodeName();
            if (codeName != null) {
                result = factory.createStringValue(codeName);
            }
        }
View Full Code Here

        errorProperties.put(STRING_PROPERTY_NAME, STRING_PROPERTY_VALUE);
        errorProperties.put(INT_PROPERTY_NAME, INT_PROPERTY_VALUE);

        TryProcess process = new TryProcess(null);
        XMLPipelineException e = new XMLPipelineException(ERROR_MESSAGE, null);
        e.initErrorInfo(ERROR_SOURCEID, ERROR_CODEURI, ERROR_CODENAME, errorProperties);
        process.addException(e);
        context.pushObject(process, false);
    }
View Full Code Here

        XMLProcess removed = removeProcess();
        // check that the correct process was removed.
        if (expected != removed) {
            XMLPipelineContext context = getPipelineContext();
            XMLPipelineException error = new XMLPipelineException(
                    "Expected to remove process " + expected +
                    "from the pipeline, but actually removed " + removed,
                    context.getCurrentLocator());
            // send the error down the pipeline
            fatalError(error);
View Full Code Here

                // dynamic process. Don't do it into the dynamic process as
                // that will cause any markup to get reevaluated.
                value.streamContents(getTargetProcess(dynamicProcess));

            } catch (ExpressionException e) {
                dynamicProcess.fatalError(new XMLPipelineException(
                        "Error parsing '" + expr +
                        "' from expr attribute on " + element,
                        pipelineContext.getCurrentLocator(), e));
            }
        }
View Full Code Here

        SAXParseException x = getException(context);
        ExpressionFactory factory = context.getFactory();
        Value result = Sequence.EMPTY;

        if (x instanceof XMLPipelineException) {
            XMLPipelineException pipelineException = (XMLPipelineException) x;
            String sourceID = pipelineException.getErrorSourceID();
            if (sourceID != null) {
                result = factory.createStringValue(sourceID);
            }
        }
View Full Code Here

        SAXParseException x = getException(context);
        ExpressionFactory factory = context.getFactory();
        Value result = Sequence.EMPTY;

        if (x instanceof XMLPipelineException) {
            XMLPipelineException pipelineException = (XMLPipelineException) x;
            Map errorProperties = pipelineException.getErrorProperties();
            if (errorProperties != null) {
                Object value = errorProperties.get(arg.asJavaString());
                if (value != null) {
                    result = factory.createStringValue(value.toString());
                }
View Full Code Here

TOP

Related Classes of com.volantis.xml.pipeline.sax.XMLPipelineException

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.