Package org.apache.cxf.aegis.databinding

Examples of org.apache.cxf.aegis.databinding.AegisDatabinding


    }

    @Test
    public void talkToJaxWsHolder() throws Exception {
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setDataBinding(new AegisDatabinding());
        factory.setAddress("local://JaxWsEcho");
        Echo client = (Echo) factory.create(Echo.class);
        Holder<String> sholder = new Holder<String>();
        client.echo("Channa Doll", sholder);
        assertEquals("Channa Doll", sholder.value);
View Full Code Here


    @Test
    public void ordinaryParamNameTest() throws Exception {
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        ReflectionServiceFactoryBean factory = new ReflectionServiceFactoryBean();
        proxyFac.setServiceFactory(factory);
        proxyFac.setDataBinding(new AegisDatabinding());

        proxyFac.setAddress("local://Echo");
        proxyFac.setBus(getBus());

        Echo echo = proxyFac.create(Echo.class);
View Full Code Here

        // String serviceURL = "http://localhost:8080/BookService";
        try {
            Client client = new ClientImpl(new URL("http://localhost:6980/BookService?WSDL"));

            Service s = client.getEndpoint().getService();
            AegisDatabinding db = new AegisDatabinding();
            s.setDataBinding(db);
            db.initialize(s);
           
            TypeMapping tm = (TypeMapping) s.get(TypeMapping.class.getName());
            BeanType type = new BeanType();
            type.setSchemaType(new QName("http://org.codehaus.xfire.client", "Book"));
            type.setTypeClass(Book.class);
View Full Code Here

    protected Server createJaxwsService(Class serviceClass, Object serviceBean, String address, QName name) {
        if (address == null) {
            address = serviceClass.getSimpleName();
        }
        JaxWsServiceFactoryBean sf = new JaxWsServiceFactoryBean();
        sf.setDataBinding(new AegisDatabinding());
        JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
        serverFactoryBean.setServiceClass(serviceClass);
       
        if (serviceBean != null) {
            serverFactoryBean.setServiceBean(serviceBean);
View Full Code Here

        if (binding == null) {
            AegisContext context = new AegisContext();
            if (enableJDOM) {
                context.setEnableJDOMMappings(true);
            }
            binding = new AegisDatabinding();
            // perhaps the data binding needs to do this for itself?
            binding.setBus(BusFactory.getDefaultBus());
            if (enableJDOM) { // this preserves pre-2.1 behavior.
                binding.setAegisContext(context);
            }
View Full Code Here

   
    @Before
    public void before() throws Exception {
        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setAddress("http://localhost:9167/Echo");
        sf.setDataBinding(new AegisDatabinding());
        sf.setServiceBean(new Echo());
        Server server = sf.create();
        // turn off nanny in URIMappingInterceptor
        server.getEndpoint()
            .getService().put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
       
        ServerFactoryBean sf2 = new ServerFactoryBean();
        sf2.setAddress("http://localhost:9167/SimpleEcho");
        sf2.setDataBinding(new AegisDatabinding());
        sf2.setServiceBean(new Echo());
        server = sf2.create();
        // turn off nanny in URIMappingInterceptor
        server.getEndpoint()
            .getService().put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
View Full Code Here

*/
public class OverrideTypeTest extends AbstractAegisTest {
   
    @Test
    public void testOverrideBean() throws Exception {
        AegisDatabinding aegisDatabinding = new AegisDatabinding();
        Set<String> types = new HashSet<String>();
        types.add("org.apache.cxf.aegis.inheritance.Employee");
        aegisDatabinding.setOverrideTypes(types);
        DataReader<XMLStreamReader> dataReader =
            aegisDatabinding.createReader(XMLStreamReader.class);
        InputStream employeeBytes =
            testUtilities.getResourceAsStream("/org/apache/cxf/aegis/override/employee.xml");
       
        XMLInputFactory readerFactory = XMLInputFactory.newInstance();
        XMLStreamReader reader = readerFactory.createXMLStreamReader(employeeBytes);
View Full Code Here

        ServerFactoryBean sf = new ServerFactoryBean();
        // use full parameter names.
        sf.setServiceClass(FlatArrayServiceInterface.class);
        sf.setServiceBean(service);
        sf.setAddress("local://FlatArray");
        sf.setDataBinding(new AegisDatabinding());
        Server s = sf.create();
        s.getEndpoint().getInInterceptors().add(new LoggingInInterceptor());

        arrayWsdlDoc = getWSDLDocument("FlatArrayServiceInterface");
    }
View Full Code Here

    }

    @Test
    public void testDataMovementPart() throws Exception {
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setDataBinding(new AegisDatabinding());
        proxyFac.setAddress("local://FlatArray");
        proxyFac.setBus(getBus());

        FlatArrayServiceInterface client = proxyFac.create(FlatArrayServiceInterface.class);
        client.submitStringArray(STRING_ARRAY);
View Full Code Here

    }

    @Test
    public void testDataMovementBean() throws Exception {
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setDataBinding(new AegisDatabinding());
        proxyFac.setAddress("local://FlatArray");
        proxyFac.setBus(getBus());

        FlatArrayServiceInterface client = proxyFac.create(FlatArrayServiceInterface.class);
        BeanWithFlatArray bwfa = new BeanWithFlatArray();
View Full Code Here

TOP

Related Classes of org.apache.cxf.aegis.databinding.AegisDatabinding

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.