Package org.apache.tuscany.sca.databinding

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


            }
            JSONBadgerfishDataSource ds = new JSONBadgerfishDataSource(json);
            OMNamespace namespace = factory.createOMNamespace(ns, "");
            return factory.createOMElement(ds, name, namespace);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here


            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
            StreamSource streamSource = new StreamSource(new StringReader(source));
            Object result = unmarshaller.unmarshal(streamSource, JAXBContextHelper.getJavaType(context.getTargetDataType()));
            return JAXBContextHelper.createReturnValue(context.getTargetDataType(), result);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            name = element.getName();
            bean = element.getValue();
            BeanXMLStreamReaderImpl reader = new BeanXMLStreamReaderImpl(name, bean);
            return reader;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            OMNamespace ns = AxiomHelper.createOMNamespace(factory, new QName("http://callable"));
            element = factory.createOMElement("reference",ns);
            element.setText(Base64Binary.encode(bos.toByteArray()));
            return element;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            JAXBContext jaxbContext = JAXBContextHelper.createJAXBContext(context, false);
            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
            Object result = unmarshaller.unmarshal(source, JAXBContextHelper.getJavaType(context.getTargetDataType()));
            return JAXBContextHelper.createReturnValue(context.getTargetDataType(), result);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
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

            JAXBContext context = JAXBContextHelper.createJAXBContext(tContext, true);
            Marshaller marshaller = context.createMarshaller();
            JAXBElement<?> jaxbElement = JAXBContextHelper.createJAXBElement(tContext.getSourceDataType(), source);
            marshaller.marshal(jaxbElement, target);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            Document document = DOMHelper.newDocument();
            JAXBElement<?> jaxbElement = JAXBContextHelper.createJAXBElement(tContext.getSourceDataType(), source);
            marshaller.marshal(jaxbElement, document);
            return DOMHelper.adjustElementName(tContext, document.getDocumentElement());
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
            StreamSource streamSource = new StreamSource(source);
            Object result = unmarshaller.unmarshal(streamSource, JAXBContextHelper.getJavaType(context.getTargetDataType()));
            return JAXBContextHelper.createReturnValue(context.getTargetDataType(), result);
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

            // a DOM Node
            Object result = unmarshaller.unmarshal(source, JAXBContextHelper.getJavaType(context.getTargetDataType()));
            source.close();
            return JAXBContextHelper.createReturnValue(context.getTargetDataType(), result);
        } 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.