Package org.apache.tuscany.spi.databinding

Examples of org.apache.tuscany.spi.databinding.TransformationException


                // FIXME: Do we want to handle wrapped to wrapped?
                return mediator.mediate(response, sourceType.getLogical(), targetType.getLogical(), context
                    .getMetadata());
            }
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here


    private WrapperHandler getWapperHandler(String dataBindingId, boolean required) {
        DataBinding dataBinding = dataBindingRegistry.getDataBinding(dataBindingId);
        WrapperHandler wrapperHandler = dataBinding == null ? null : dataBinding.getWrapperHandler();
        if (wrapperHandler == null && required) {
            throw new TransformationException(
                                              "No wrapper handler is provided for databinding: " + dataBindingId);
        }
        return wrapperHandler;
    }
View Full Code Here

    public Node transform(XMLStreamReader source, TransformationContext context) {
        try {
            stax2sax.transform(source, pipe.getSink(), context);
            return pipe.getResult();
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

    public String transform(XMLStreamReader source, TransformationContext context) {
        try {
            return StAXHelper.save(source);
        } catch (XMLStreamException e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

        try {
            Source domSource = new DOMSource(source);
            Result result = new StreamResult(writer);
            TRANSFORMER.transform(domSource, result, context);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

    PushTransformer<Reader, ContentHandler> {
    public void transform(Reader source, ContentHandler target, TransformationContext context) {
        try {
            new InputSource2SAX().transform(new InputSource(source), target, context);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

    public XMLStreamReader transform(String source, TransformationContext context) {
        try {
            return StAXHelper.createXMLStreamReader(source);
        } catch (XMLStreamException e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

    public void transform(String source, ContentHandler target, TransformationContext context) {
        try {
            new InputSource2SAX().transform(new InputSource(new StringReader(source)), target, context);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

    public Object2Node() {
        super(null);
        try {
            factory = DOMHelper.newDocument();
        } catch (ParserConfigurationException e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

        try {
            XMLReader reader = XMLReaderFactory.createXMLReader();
            reader.setContentHandler(target);
            reader.parse(new InputSource(source));
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.spi.databinding.TransformationException

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.