Package org.apache.tuscany.spi.databinding

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


        try {
            JAXBContext jaxbContext = JAXBContextHelper.createJAXBContext(context, false);
            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
            return unmarshaller.unmarshal(source);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here


    public T transform(InputSource source, TransformationContext context) {
        try {
            Object object = Unmarshaller.unmarshal(type, source);
            return type.cast(object);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            // marshaller.getNode()
            Document document = DOMHelper.newDocument();
            marshaller.marshal(source, document);
            return document;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

     */
    public void transform(T source, Writer writer, TransformationContext context) {
        try {
            Marshaller.marshal(source, writer);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

        try {
            Document document = DOMHelper.newDocument();
            Marshaller.marshal(source, document);
            return document;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            JAXBContext jaxbContext = JAXBContextHelper.createJAXBContext(context, false);
            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
            StreamSource streamSource = new StreamSource(source);
            return unmarshaller.unmarshal(streamSource);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

    public T transform(Node source, TransformationContext context) {
        try {
            Object object = Unmarshaller.unmarshal(type, source);
            return type.cast(object);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

    public T transform(Reader source, TransformationContext context) {
        try {
            Object object = Unmarshaller.unmarshal(type, source);
            return type.cast(object);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

     */
    public void transform(T source, ContentHandler contentHandler, TransformationContext context) {
        try {
            Marshaller.marshal(source, contentHandler);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

        String dataBindingId;
        dataBindingId = operation.getDataBinding();
        DataBinding dataBinding = dataBindingRegistry.getDataBinding(dataBindingId);
        WrapperHandler wrapperHandler = dataBinding == null ? null : dataBinding.getWrapperHandler();
        if (wrapperHandler == null) {
            throw new TransformationException(
                                              "No wrapper handler is provided for databinding: " + dataBindingId);
        }
        return wrapperHandler;
    }
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.