Examples of XFireProxyFactory


Examples of org.codehaus.xfire.client.XFireProxyFactory

       
        // Create the service model
        Service serviceModel = sf.create(Echo.class);
       
        // Create a proxy for the service
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) factory.create(serviceModel, "jms://Echo");
       
        // Since JMS doesn't really have a concept of anonymous endpoints, we need
        // need to let xfire know what JMS endpoint we should use
        ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient().setEndpointUri("jms://Peer1");
       
View Full Code Here

Examples of org.codehaus.xfire.client.XFireProxyFactory

       
        // Create the service model
        Service serviceModel = sf.create(Echo.class);
       
        // Create a proxy for the service
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) factory.create(serviceModel, "jms://GenericQueue?queue=Echo");
       
        // Since JMS doesn't really have a concept of anonymous endpoints, we need
        // need to let xfire know what JMS endpoint we should use
        ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient().setEndpointUri("jms://Peer1");
       
View Full Code Here

Examples of org.codehaus.xfire.client.XFireProxyFactory

       
        // Create the service model
        Service serviceModel = sf.create(Echo.class);
       
        // Create a proxy for the service
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) factory.create(serviceModel, "jms://GenericTopic?topic=Echo");
       
        // Since JMS doesn't really have a concept of anonymous endpoints, we need
        // need to let xfire know what JMS endpoint we should use
        ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient().setEndpointUri("jms://GenericTopic?topic=Echo");
       
View Full Code Here

Examples of org.codehaus.xfire.client.XFireProxyFactory

                .create(MTOMService.class,
                        "MTOMService",
                        "http://xfire.codehaus.org/MTOMService",
                        null);

        MTOMService service = (MTOMService) new XFireProxyFactory()
                .create(serviceModel, "http://localhost:8080/mtom/services/MTOMService");

         // Setup properties
        Client client = Client.getInstance(service);
        client.setProperty("mtom-enabled", "true");
View Full Code Here

Examples of org.codehaus.xfire.client.XFireProxyFactory

        Service service = getServiceFactory().create(MapService.class, null, "urn:MapService", null);
        getServiceRegistry().register(service);

        service.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, MapServiceImpl.class);
       
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        MapService client = (MapService) factory.create(service, "xfire.local://MapService");

        // this fails when we do it... Woodstox bug?
//        Client xclient = Client.getInstance(client);
//        xclient.addOutHandler(new DOMOutHandler());
//        xclient.addOutHandler(new LoggingHandler());
View Full Code Here

Examples of org.codehaus.xfire.client.XFireProxyFactory

    service.addOutHandler(new DOMOutHandler());
   
      Document d = getWSDLDocument("CollectionService");

      CollectionService client = (CollectionService)
        new XFireProxyFactory(getXFire()).create(service,
            "xfire.local://CollectionService");
     
      client.getFoos();
  }
View Full Code Here

Examples of org.codehaus.xfire.client.XFireProxyFactory

    }
   
    public void testClient() throws Exception
    {
        Service serviceModel = getXFire().getServiceRegistry().getService("BookService");
        XFireProxyFactory serviceFactory = new XFireProxyFactory(getXFire());
       
        // Connect to web service.
        BookService service = (BookService) serviceFactory.create(serviceModel, "xfire.local://BookService");
        assertNotNull(service);
       
        // Call web service.
        Book[] books = service.getBooks();
        assertNotNull(books);
View Full Code Here

Examples of org.codehaus.xfire.client.XFireProxyFactory

    public static void main(String args[])
    {
        String serviceURL = "http://localhost:8088/book/services/BookService";
        Service serviceModel = new ObjectServiceFactory().create(BookService.class,null,"http://xfire.codehaus.org/BookService",null);
       
        XFireProxyFactory serviceFactory = new XFireProxyFactory();
       
        try
        {
            BookService service = (BookService) serviceFactory.create(serviceModel, serviceURL);
            Client client = Client.getInstance(service);
            client.addOutHandler(new OutHeaderHandler());
            // disable timeout
            client.setProperty(CommonsHttpMessageSender.HTTP_TIMEOUT, "0");
           
View Full Code Here

Examples of org.codehaus.xfire.client.XFireProxyFactory

        super.tearDown();
    }

    public void testProxy() throws MalformedURLException, XFireFault
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "http://localhost:8191/Echo");
       
        Client client = ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient();
        client.setProperty(Channel.USERNAME, "user");
        client.setProperty(Channel.PASSWORD, "pass");
       
View Full Code Here

Examples of org.codehaus.xfire.client.XFireProxyFactory

        super.tearDown();
    }
   
    public void testProxy() throws MalformedURLException, XFireFault
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "https://localhost:8443/Echo");

        Protocol protocol = new Protocol("https", (ProtocolSocketFactory) new EasySSLProtocolSocketFactory(), 8443);
        Protocol.registerProtocol("https", protocol);
       
        Element root = new Element("root", "a", "urn:a");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.