Package org.apache.tuscany.sca.databinding

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


        if (dataBindingId != null) {
            DataBinding dataBinding = mediator.getDataBindings().getDataBinding(dataBindingId);
            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


        if (dataBindingId != null) {
            DataBinding dataBinding = mediator.getDataBindings().getDataBinding(dataBindingId);
            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

                    }
                    return target[0];
                }
            }
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

    private JAXBContextHelper() {
    }

    public static JAXBContext createJAXBContext(TransformationContext tContext, boolean source) throws JAXBException {
        if (tContext == null)
            throw new TransformationException("JAXB context is not set for the transformation.");

        DataType<?> dataType = source ? tContext.getSourceDataType() : tContext.getTargetDataType();
        // FIXME: We should check the context path or classes
        // FIXME: What should we do if JAXB is an intermediate node?

        // String contextPath = null;
        JAXBContext context = null;
        Class<?> cls = getJavaType(dataType);

        context = JAXBContext.newInstance(cls);

        if (context == null) {
            throw new TransformationException("JAXB context is not set for the transformation.");
        }
        return context;
    }
View Full Code Here

            Object obj = ois.readObject();
            ois.close();
            Externalizable aReference = (Externalizable) obj;
            return aReference;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

        }
        try {
            Type type = helperContext.getTypeHelper().getType(javaType);
            return register(helperContext, type);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            Properties props = new Properties();
            props.setProperty(OutputKeys.METHOD, "xml");
            props.setProperty(OutputKeys.INDENT, "yes");
            QueryResult.serialize(source, destination, props, source.getConfiguration());
        } catch (Exception e) {
            throw new TransformationException(e);
        }
        return destination.getNode();
    }
View Full Code Here

        NodeInfo docInfo = null;
        try {
            source = DOMHelper.promote(source);
            docInfo = Builder.build(new DOMSource(source), null, configuration);
        } catch (XPathException e) {
            throw new TransformationException(e);
        }
        return docInfo;
    }
View Full Code Here

    public Object transform(Value source, TransformationContext context) {
        Object object;
        try {
            object = Value.convert(Value.asItem(source));
        } catch (XPathException e) {
            throw new TransformationException(e);
        }
        return object;
    }
View Full Code Here

    public Object transform(Value source, TransformationContext context) {
        Object object;
        try {
            object = Value.convert(Value.asItem(source));
        } catch (XPathException e) {
            throw new TransformationException(e);
        }
        return object;
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.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.