Package org.apache.servicemix.jsr181.xfire

Examples of org.apache.servicemix.jsr181.xfire.JbiChannel


            logger.info(e.getMessage());
        }
    }
   
    public void testDuplicates() throws Exception {
        Jsr181Component component = new Jsr181Component();
        container.activateComponent(component, "JSR181Component");
        try {
            component.getServiceUnitManager().deploy("bad3", getServiceUnitPath("bad3"));
            fail("Expected an exception");
        } catch (Exception e) {
            // ok
            logger.info(e.getMessage());
        }
View Full Code Here


            logger.info(e.getMessage());
        }
    }
   
    public void testNotJsr181Endpoint() throws Exception {
        Jsr181Component component = new Jsr181Component();
        container.activateComponent(component, "JSR181Component");
        try {
            component.getServiceUnitManager().deploy("bad4", getServiceUnitPath("bad4"));
            fail("Expected an exception");
        } catch (Exception e) {
            // ok
            logger.info(e.getMessage());
        }
View Full Code Here

            logger.info(e.getMessage());
        }
    }
   
    public void testUnrecognizedTypeMapping() throws Exception {
        Jsr181Component component = new Jsr181Component();
        container.activateComponent(component, "JSR181Component");
        try {
            component.getServiceUnitManager().deploy("bad5", getServiceUnitPath("bad5"));
            fail("Expected an exception");
        } catch (Exception e) {
            // ok
            logger.info(e.getMessage());
        }
View Full Code Here

            logger.info(e.getMessage());
        }
    }
   
    public void testUnrecognizedAnnotations() throws Exception {
        Jsr181Component component = new Jsr181Component();
        container.activateComponent(component, "JSR181Component");
        try {
            component.getServiceUnitManager().deploy("bad6", getServiceUnitPath("bad6"));
            fail("Expected an exception");
        } catch (Exception e) {
            // ok
            logger.info(e.getMessage());
        }
View Full Code Here

        return new ArrayList<Consumes>();
    }

    protected List<Provides> getProvides(Endpoint endpoint) {
        // We need to generate the dummy component to register the services
        Jsr181Endpoint jsr181Endpoint = (Jsr181Endpoint) endpoint;
        try {
            Jsr181Component componentDummy = new Jsr181Component();
            componentDummy.setEndpoints(new Jsr181Endpoint[] {jsr181Endpoint });
            componentDummy.getLifeCycle().init(new DummyComponentContext());
        } catch (Exception e) {
View Full Code Here

   
    public void testProxy() throws Exception {
        container.start();

        Jsr181Component component1 = new Jsr181Component();
        Jsr181Endpoint endpoint1 = new Jsr181Endpoint();
        endpoint1.setPojo(new EchoService());
        component1.setEndpoints(new Jsr181Endpoint[] {endpoint1 });
        container.activateComponent(component1, "JSR181Component-1");
       
        Jsr181Component component2 = new Jsr181Component();
        Jsr181Endpoint endpoint2 = new Jsr181Endpoint();
        endpoint2.setPojo(new ProxyPojoService());
        endpoint2.setServiceInterface(ProxyPojo.class.getName());
        component2.setEndpoints(new Jsr181Endpoint[] {endpoint2 });
        container.activateComponent(component2, "JSR181Component-2");
       
        DefaultServiceMixClient client = new DefaultServiceMixClient(container);
        InOut me = client.createInOutExchange();
View Full Code Here

    public void testWithSpecifiedNamesWithAnnotations() throws Exception {
        QName svcName = new QName("svcUri", "service");
        QName itfName = new QName("itfUri", "interface");
        String epName = "endpoint";
        Jsr181SpringComponent component = new Jsr181SpringComponent();
        Jsr181Endpoint endpoint = new Jsr181Endpoint();
        endpoint.setService(svcName);
        endpoint.setInterfaceName(itfName);
        endpoint.setEndpoint(epName);
        endpoint.setPojo(new EchoService());
        component.setEndpoints(new Jsr181Endpoint[] { endpoint });
        container.activateComponent(component, "JSR181Component");
    }
View Full Code Here

    public void testWithSpecifiedNamesWithoutAnnotations() throws Exception {
        QName svcName = new QName("svcUri", "service");
        QName itfName = new QName("itfUri", "interface");
        String epName = "endpoint";
        Jsr181SpringComponent component = new Jsr181SpringComponent();
        Jsr181Endpoint endpoint = new Jsr181Endpoint();
        endpoint.setService(svcName);
        endpoint.setInterfaceName(itfName);
        endpoint.setEndpoint(epName);
        endpoint.setPojo(new EchoService2());
        component.setEndpoints(new Jsr181Endpoint[] { endpoint });
        container.activateComponent(component, "JSR181Component");
    }
View Full Code Here

   
    public void testProxy() throws Exception {
        container.start();

        Jsr181SpringComponent component1 = new Jsr181SpringComponent();
        Jsr181Endpoint endpoint1 = new Jsr181Endpoint();
        endpoint1.setPojo(new EchoService());
        component1.setEndpoints(new Jsr181Endpoint[] { endpoint1 });
        container.activateComponent(component1, "JSR181Component-1");
       
        Jsr181SpringComponent component2 = new Jsr181SpringComponent();
        Jsr181Endpoint endpoint2 = new Jsr181Endpoint();
        endpoint2.setPojo(new ProxyPojoService());
        endpoint2.setServiceInterface(ProxyPojo.class.getName());
        component2.setEndpoints(new Jsr181Endpoint[] { endpoint2 });
        container.activateComponent(component2, "JSR181Component-2");
       
        DefaultServiceMixClient client = new DefaultServiceMixClient(container);
        InOut me = client.createInOutExchange();
View Full Code Here

  }

  protected List getProvides(Endpoint endpoint) {

    // We need to generate the dummy component to register the services
    Jsr181Endpoint jsr181Endpoint = (Jsr181Endpoint) endpoint;
    try {
      Jsr181SpringComponent componentDummy = new Jsr181SpringComponent();
      componentDummy
          .setEndpoints(new Jsr181Endpoint[] { jsr181Endpoint });
      componentDummy.getLifeCycle().init(new DummyComponentContext());
View Full Code Here

TOP

Related Classes of org.apache.servicemix.jsr181.xfire.JbiChannel

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.