Package org.apache.tuscany.sca.databinding

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


        }
        try {
            DOMXMLStreamReader reader = new DOMXMLStreamReader(source);
            return reader;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here


        try {
            HelperContext helperContext = SDOContextHelper.getHelperContext(context);
            XMLHelper xmlHelper = helperContext.getXMLHelper();
            return xmlHelper.load(source).getRootObject();
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            Document doc = DOMHelper.promote(source);
            DOMSource domSource = new DOMSource(doc);
            XMLDocument xmlDoc = xmlHelper.load(domSource, doc.getDocumentURI(), null);
            return xmlDoc.getRootObject();
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            HelperContext helperContext = SDOContextHelper.getHelperContext(context);
            XMLHelper xmlHelper = helperContext.getXMLHelper();
            QName elementName = SDOContextHelper.getElement(context);
            return xmlHelper.save(source, elementName.getNamespaceURI(), elementName.getLocalPart());
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            }
            DataObject target = streamHelper.loadObject(source);
            source.close();
            return target;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

                method.invoke(factory, new Object[] {helperContext});
                return true;
            }
            return false;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            DOMResult result = new DOMResult(doc);
            XMLDocument xmlDoc = xmlHelper.createDocument(source, elementName.getNamespaceURI(), elementName.getLocalPart());
            xmlHelper.save(xmlDoc, result, null);
            return doc.getDocumentElement();
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            XMLStreamHelper streamHelper = SDOUtil.createXMLStreamHelper(helperContext);
            XMLDocument target = streamHelper.load(source);
            source.close();
            return target;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            xs.alias("xobject", mj.getClass());
            xs.marshal(source, out);
            DOMHelper.adjustElementName(context, root.getDocumentElement());
            return root;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

                in = new DomReader((Element)source);
            }
            XStream xs = new XStream();
            return (XObject)xs.unmarshal(in);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
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.