Package org.apache.cxf.jaxb

Examples of org.apache.cxf.jaxb.JAXBDataBinding


        System.out.println("Executing testDocLitFault sayHi\n");
        List<Header> headers = new ArrayList<Header>();
        Header header = null;
        try {
            header = new Header(new QName("http://test", "test"),
                                new String("test"), new JAXBDataBinding(String.class));
        } catch (JAXBException e) {
            e.printStackTrace();
        }                       
        headers.add(header);
        context.getMessageContext().put(Header.HEADER_LIST, headers);
View Full Code Here


        //Initialize Features.
        configureObject(portName.toString() + ".jaxws-client.proxyFactory", clientFac);

        AbstractServiceFactoryBean sf = null;
        try {
            sf = createDispatchService(new JAXBDataBinding(context));
        } catch (ServiceConstructionException e) {
            throw new WebServiceException(e);
        }
        Endpoint endpoint = getJaxwsEndpoint(portName, sf);
        Client client = new ClientImpl(getBus(), endpoint, clientFac.getConduitSelector());
View Full Code Here

        }
        return null;
    }
   
    private QName getPayloadElementName(Object object) {
        JAXBDataBinding dataBinding = new JAXBDataBinding();
        dataBinding.setContext(context);
        DataWriter<XMLStreamWriter> dbwriter = dataBinding.createWriter(XMLStreamWriter.class);
        StringWriter stringWriter = new StringWriter();
        XMLStreamWriter resultWriter = StaxUtils.createXMLStreamWriter(stringWriter);
        DepthXMLStreamReader reader = null;
        try {
            dbwriter.write(object, resultWriter);
View Full Code Here

        } catch (JAXBException jbe) {
            throw new IllegalStateException("Unable to create JAXBContext for generated packages: "
                                            + jbe.getMessage(), jbe);
        }
        
        JAXBDataBinding databinding = new JAXBDataBinding();
        databinding.setContext(context);
        svc.setDataBinding(databinding);

        ServiceInfo svcfo = client.getEndpoint().getEndpointInfo().getService();

        // Setup the new classloader!
View Full Code Here

                                 QName qname,
                                 Class<T> clz,
                                 JAXBContext ctx,
                                 boolean mustUnderstand) throws JAXBException {
        SoapHeader h = new SoapHeader(qname, new JAXBElement<T>(qname, clz, value),
                                      new JAXBDataBinding(ctx));
        h.setMustUnderstand(mustUnderstand);
        message.getHeaders().add(h);
    }
View Full Code Here

    @Test
    public void testDeserialization() throws Exception {
        setupClientAndRhino("simple-dlwu-proxy-factory");
        testUtilities.readResourceIntoRhino("/deserializationTests.js");
        DataBinding dataBinding = new JAXBDataBinding(TestBean1.class, TestBean2.class);
        assertNotNull(dataBinding);
        TestBean1 bean = new TestBean1();
        bean.stringItem = "bean1>stringItem";
        bean.doubleItem = -1.0;
        String serialized = serializeObject(dataBinding, bean);
View Full Code Here

    @Test
    public void testDeserialization() throws Exception {
        setupClientAndRhino("attribute-test-proxy-factory");
        testUtilities.readResourceIntoRhino("/attributeTests.js");
        DataBinding dataBinding = new JAXBDataBinding(AttributeTestBean.class);
        assertNotNull(dataBinding);
        AttributeTestBean bean = new AttributeTestBean();
        bean.element1 = "e1";
        bean.element2 = "e2";
        bean.attribute1 = "a1";
View Full Code Here

        //Initialize Features.
        configureObject(portName.toString() + ".jaxws-client.proxyFactory", clientFac);

        AbstractServiceFactoryBean sf = null;
        try {
            JAXBDataBinding db = new JAXBDataBinding(context);
            db.setUnwrapJAXBElement(false);
            sf = createDispatchService(db);
        } catch (ServiceConstructionException e) {
            throw new WebServiceException(e);
        }
        Endpoint endpoint = getJaxwsEndpoint(portName, sf, features);
View Full Code Here

        ignoredClasses.add("javax.ejb.EJBObject");
        ignoredClasses.add("javax.rmi.CORBA.Stub");
    }
   
    protected DataBinding createDefaultDataBinding() {
        return new JAXBDataBinding(getQualifyWrapperSchema());
    }
View Full Code Here

                            + db.value().getName(), e);
                }
            }
        }
        if (retVal == null) {
            JAXBDataBinding db = new JAXBDataBinding(getQualifyWrapperSchema());
            Map props = this.getProperties();
            if (props != null && props.get("jaxb.additionalContextClasses") != null) {
                Object o = this.getProperties().get("jaxb.additionalContextClasses");
                if (o instanceof Class) {
                    o = new Class[] {(Class)o};
                }
                Class[] extraClass = (Class[])o;
                db.setExtraClass(extraClass);
            }
            retVal = db;
        }
        return retVal;
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxb.JAXBDataBinding

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.