Examples of NMR


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);
        installBundle("org.apache.servicemix", "servicemix-shared-compat", "installer", "zip");
        installBundle("org.apache.servicemix", "servicemix-eip", "installer", "zip");
        System.out.println("Waiting for JBI Component");
        Component cmp = (Component) getOsgiService(Component.class);
View Full Code Here

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

public class IntegrationTest extends AbstractIntegrationTest {

    @Test
    public void testJbiComponent() throws Exception {
        System.out.println("Waiting for NMR");
        NMR nmr = getOsgiService(NMR.class);
        assertNotNull(nmr);

        Bundle smxShared = installJbiBundle("org.apache.servicemix", "servicemix-shared", "installer", "zip");
        Bundle smxEip = installJbiBundle("org.apache.servicemix", "servicemix-eip", "installer", "zip");
View Full Code Here

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

    }

    @Test
    public void testServiceAssembly() throws Throwable {
        System.out.println("Waiting for NMR");
        NMR nmr = getOsgiService(NMR.class);
        assertNotNull(nmr);

        Bundle smxShared = installJbiBundle("org.apache.servicemix", "servicemix-shared", "installer", "zip");
        Bundle smxJsr181 = installJbiBundle("org.apache.servicemix", "servicemix-jsr181", "installer", "zip");
        Bundle smxHttp = installJbiBundle("org.apache.servicemix", "servicemix-http", "installer", "zip");
View Full Code Here

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

    }

    @Test
    public void testJbiLifecycle() throws Exception {
        System.out.println("Waiting for NMR");
        NMR nmr = getOsgiService(NMR.class);
        assertNotNull(nmr);

        Bundle smxShared = installJbiBundle("org.apache.servicemix", "servicemix-shared", "installer", "zip");
        Bundle smxJsr181 = installJbiBundle("org.apache.servicemix", "servicemix-jsr181", "installer", "zip");
        Bundle smxHttp = 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.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

    protected Object doExecute() throws Exception {
        System.out.println("Endpoints");
        System.out.println("---------");
        ServiceReference reference = getBundleContext().getServiceReference(NMR.class.getName());
        if (reference != null) {
            NMR nmr = (NMR)getBundleContext().getService(reference);
            if (nmr != null) {
              Set<Endpoint> endpoints = nmr.getEndpointRegistry().getServices();
              for (Endpoint endpoint : endpoints) {
                String name = (String)nmr.getEndpointRegistry().getProperties(endpoint).get(Endpoint.NAME);
                System.out.println(name);
              }
            }
        }
        System.out.println();
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("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.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
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.