Package org.apache.cxf.aegis.databinding

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


       
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.getServiceFactory().getServiceConfigurations().add(0,
                                                              new XFireCompatibilityServiceConfiguration());
        proxyFac.setServiceClass(CollectionServiceInterface.class);
        proxyFac.setDataBinding(new AegisDatabinding());
        proxyFac.setAddress("local://CollectionService");
        proxyFac.setBus(getBus());

        CollectionServiceInterface csi = (CollectionServiceInterface)proxyFac.create();
        SortedSet<String> strings = new TreeSet<String>();
View Full Code Here


    @SuppressWarnings("deprecation")
    @Before
    public void before() throws Exception {
        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setAddress("http://localhost:" + PORT + "/Echo");
        sf.setDataBinding(new AegisDatabinding());
        sf.setServiceBean(new Echo());
        sf.getInInterceptors().add(new URIMappingInterceptor());
        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:" + PORT + "/SimpleEcho");
        sf2.setDataBinding(new AegisDatabinding());
        sf2.setServiceBean(new Echo());
        sf2.getInInterceptors().add(new URIMappingInterceptor());
        server = sf2.create();
        // turn off nanny in URIMappingInterceptor
        server.getEndpoint()
View Full Code Here

   
    private Server startServer(String address, Class<?> type, Object impl) {
        ServerFactoryBean factory = new ServerFactoryBean();
        factory.setServiceClass(type);
        factory.setAddress(address);
        factory.getServiceFactory().setDataBinding(new AegisDatabinding());
        factory.setServiceBean(impl);
        Server server = factory.create();
        server.start();
        return server;
    }
View Full Code Here

        GreeterService greeter1 = null;
        try {
            ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
            factory.setServiceClass(GreeterService.class);
            factory.setAddress(address);
            factory.getServiceFactory().setDataBinding(new AegisDatabinding());
            greeter1 = (GreeterService)factory.create();
            useService(greeter1);
        } finally {
            Thread.currentThread().setContextClassLoader(contextLoader);
        }
View Full Code Here

        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
        try {
            ClientProxyFactoryBean factory = createClientProxyFactoryBean();
            factory.setServiceClass(iClass);
            factory.setAddress(address);
            factory.getServiceFactory().setDataBinding(new AegisDatabinding());

            applyIntents(dswContext,
                         callingContext,
                         factory.getFeatures(),
                         factory.getClientFactoryBean(),
View Full Code Here

            + " endpoint from CXF PublishHook, address is " + address);
       
        ServerFactoryBean factory = createServerFactoryBean();
        factory.setServiceClass(iClass);
        factory.setAddress(address);
        factory.getServiceFactory().setDataBinding(new AegisDatabinding());
        factory.setServiceBean(serviceBean);
       
        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
        try {
            String [] intents = applyIntents(
View Full Code Here

        String address = constructAddress(dswContext, contextRoot);
        ServerFactoryBean factory = createServerFactoryBean();
        factory.setBus(bus);
        factory.setServiceClass(iClass);
        factory.setAddress("/");
        factory.getServiceFactory().setDataBinding(new AegisDatabinding());
        factory.setServiceBean(serviceBean);

        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
        try {
            String [] intents =
View Full Code Here

       
        // Set up a Server in the test
        ServerFactoryBean factory = new ServerFactoryBean();
        factory.setServiceClass(GreeterService.class);
        factory.setAddress("http://localhost:9191/grrr");
        factory.getServiceFactory().setDataBinding(new AegisDatabinding());
        factory.setServiceBean(new TestGreeter());
       
        Server server = null;
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        try {
View Full Code Here

        Thread.currentThread().setContextClassLoader(ClientProxyFactoryBean.class.getClassLoader());       
        try {
            ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
            factory.setServiceClass(GreeterService.class);
            factory.setAddress("http://localhost:9090/greeter");
            factory.getServiceFactory().setDataBinding(new AegisDatabinding());
            GreeterService client = (GreeterService)factory.create();
            Map<GreetingPhrase, String> greetings = client.greetMe("Fred");
            Assert.assertEquals("Fred", greetings.get(new GreetingPhrase("Hello")));
            System.out.println("Invocation result: " + greetings);
           
View Full Code Here

        assertTrue("server did not launch correctly", launchServer(AegisServer.class));
    }
   
    @Test
    public void testAegisClient() throws Exception {
        AegisDatabinding aegisBinding = new AegisDatabinding();
        ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
        proxyFactory.setDataBinding(aegisBinding);
        proxyFactory.setServiceClass(AuthService.class);
        proxyFactory.setAddress("http://localhost:9002/service");
        AuthService service = (AuthService) proxyFactory.create();
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.