Examples of Jsr181SpringComponent


Examples of org.apache.servicemix.jsr181.Jsr181SpringComponent

   
    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

Examples of org.apache.servicemix.jsr181.Jsr181SpringComponent

   
    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

Examples of org.apache.servicemix.jsr181.Jsr181SpringComponent

    }
   
    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();
        me.setInterfaceName(new QName("http://xfire.jsr181.servicemix.apache.org", "ProxyPojoPortType"));
View Full Code Here

Examples of org.apache.servicemix.jsr181.Jsr181SpringComponent

  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());
    } catch (Exception e) {
      throw new RuntimeException("Unable to register JSR-181 service, "
          + e.getMessage(), e);
    }
    return super.getProvides(endpoint);
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.