Examples of NMR


Examples of org.apache.servicemix.nmr.api.NMR

        return (ServiceMixEndpoint) super.getEndpoint();
    }

    public void process(Exchange exchange) throws Exception {

        NMR nmr = getEndpoint().getComponent().getNmr();

        org.apache.servicemix.nmr.api.Exchange e
          = getEndpoint().getComponent().getBinding().populateNmrExchangeFromCamelExchange(exchange, client);
           
        try {
            e.setTarget(nmr.getEndpointRegistry().lookup(
                ServiceHelper.createMap(org.apache.servicemix.nmr.api.Endpoint.NAME,
                getEndpoint().getEndpointName())));
        } catch (Exception ex) {
            ex.printStackTrace();
        }
View Full Code Here

Examples of org.apache.servicemix.nmr.api.NMR

      }
  }

    @Override
    protected void doStart() throws Exception {
        NMR nmr = getEndpoint().getComponent().getNmr();
        client = nmr.createChannel();
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.api.NMR

   
    public void testNMROsgi() throws Exception {
        Thread.sleep(5000);
        waitOnContextCreation("org.apache.servicemix.examples.itests.cxf-nmr-osgi");
        Thread.sleep(5000);
        NMR nmr = getOsgiService(NMR.class);
        assertNotNull(nmr);
       
       
        ServiceReference ref = bundleContext.getServiceReference(HelloWorld.class.getName());
        assertNotNull("Service Reference is null", ref);
View Full Code Here

Examples of org.apache.servicemix.nmr.api.NMR

   
    public void testNMROsgi() throws Exception {
        Thread.sleep(5000);
        waitOnContextCreation("org.apache.servicemix.examples.itests.cxf-nmr-osgi");
        Thread.sleep(5000);
        NMR nmr = getOsgiService(NMR.class);
        assertNotNull(nmr);
       
        Channel client = nmr.createChannel();
        Exchange e = client.createExchange(Pattern.InOut);
        for (Endpoint ep : nmr.getEndpointRegistry().getServices()) {
          e.setTarget(nmr.getEndpointRegistry().lookup(nmr.getEndpointRegistry().getProperties(ep)));
          e.getIn().setBody(new StringSource("<?xml version=\"1.0\" encoding=\"UTF-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><ns2:sayHi xmlns:ns2=\"http://cxf.examples.servicemix.apache.org/\"><arg0>Bonjour</arg0></ns2:sayHi></soap:Body></soap:Envelope>"));
          boolean res = client.sendSync(e);
          assertTrue(res);
        }
   
View Full Code Here

Examples of org.apache.servicemix.nmr.api.NMR

   
    public void testNMROsgi() throws Exception {
        Thread.sleep(5000);
        waitOnContextCreation("org.apache.servicemix.itests.cxf-nmr-osgi");
        Thread.sleep(5000);
        NMR nmr = getOsgiService(NMR.class);
        assertNotNull(nmr);
       
       
        ServiceReference ref = bundleContext.getServiceReference(HelloWorld.class.getName());
        assertNotNull("Service Reference is null", ref);
View Full Code Here

Examples of org.apache.servicemix.nmr.api.NMR

    };
  }

    public void testJbiComponent() throws Exception {
        System.out.println("Waiting for NMR");
        NMR nmr = getOsgiService(NMR.class);
        assertNotNull(nmr);
        installJbiBundle("org.apache.servicemix", "servicemix-shared", "installer", "zip");
        installJbiBundle("org.apache.servicemix", "servicemix-eip", "installer", "zip");
        System.out.println("Waiting for JBI Component");
        Component cmp = getOsgiService(Component.class);
View Full Code Here

Examples of org.apache.servicemix.nmr.api.NMR

        assertNotNull(cmp);
    }

    public void testServiceAssembly() throws Throwable {
        System.out.println("Waiting for NMR");
        NMR nmr = getOsgiService(NMR.class);
        assertNotNull(nmr);
        installJbiBundle("org.apache.servicemix", "servicemix-shared", "installer", "zip");
        installJbiBundle("org.apache.servicemix", "servicemix-jsr181", "installer", "zip");
        installJbiBundle("org.apache.servicemix", "servicemix-http", "installer", "zip");
View Full Code Here

Examples of org.apache.servicemix.nmr.api.NMR

   
    public void testNMROsgi() throws Exception {
        Thread.sleep(5000);
        waitOnContextCreation("org.apache.servicemix.itests.cxf-nmr-osgi");
        Thread.sleep(5000);
        NMR nmr = getOsgiService(NMR.class);
        assertNotNull(nmr);
       
       
        ServiceReference ref = bundleContext.getServiceReference(HelloWorld.class.getName());
        assertNotNull("Service Reference is null", ref);
View Full Code Here

Examples of org.apache.servicemix.nmr.api.NMR

        return (ServiceMixEndpoint) super.getEndpoint();
    }

    public void process(Exchange exchange) throws Exception {
     
      NMR nmr = getEndpoint().getComponent().getNmr();
      Channel client = nmr.createChannel();
     
        org.apache.servicemix.nmr.api.Exchange e = client.createExchange(
            Pattern.fromWsdlUri(exchange.getPattern().getWsdlUri()));
       
        try {
          e.setTarget(nmr.getEndpointRegistry().lookup(
            ServiceHelper.createMap(org.apache.servicemix.nmr.api.Endpoint.NAME,
                getEndpoint().getEndpointName())));
        } catch (Exception ex) {
          ex.printStackTrace();
        }
View Full Code Here

Examples of org.apache.servicemix.nmr.api.NMR

   
    public void testNMROsgi() throws Exception {
        Thread.sleep(5000);
        waitOnContextCreation("cxf-nmr-osgi");
        Thread.sleep(5000);
        NMR nmr = getOsgiService(NMR.class);
        assertNotNull(nmr);
       
        Channel client = nmr.createChannel();
        Exchange e = client.createExchange(Pattern.InOut);
        for (Endpoint ep : nmr.getEndpointRegistry().getServices()) {
          e.setTarget(nmr.getEndpointRegistry().lookup(nmr.getEndpointRegistry().getProperties(ep)));
          e.getIn().setBody(new StringSource("<?xml version=\"1.0\" encoding=\"UTF-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><ns2:sayHi xmlns:ns2=\"http://cxf.examples.servicemix.apache.org/\"><arg0>Bonjour</arg0></ns2:sayHi></soap:Body></soap:Envelope>"));
          boolean res = client.sendSync(e);
          assertTrue(res);
        }
   
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.