Examples of HelloService


Examples of org.apache.felix.ipojo.runtime.core.test.services.HelloService

        handle.publish();

        String filter = format("(instance.name=%s)", "hello2");
        osgiHelper.waitForService(HelloService.class, filter, 1000);
        HelloService service = osgiHelper.getServiceObject(HelloService.class, filter);
        assertEquals(service.hello("Guillaume"), "Hello2 Guillaume");
    }
View Full Code Here

Examples of org.apache.felix.ipojo.runtime.core.test.services.HelloService

        System.out.println(instance.getStatus().getMessage());

        String filter = format("(instance.name=%s)", "german-hello");
        osgiHelper.waitForService(HelloService.class, filter, 1000);
        HelloService service = osgiHelper.getServiceObject(HelloService.class, filter);
        assertEquals(service.hello("Guillaume"), "Hallo Guillaume");

        instance.retract();

    }
View Full Code Here

Examples of org.apache.geronimo.testsuite.aries.custom.api.HelloService

            bundleContext = (BundleContext) sc.getAttribute("osgi-bundlecontext");
            PrintWriter pw = response.getWriter();
            if (bundleContext != null) {
                ServiceReference sr = bundleContext.getServiceReference(HelloService.class.getName());
                if (sr != null) {
                    HelloService sm = (HelloService) bundleContext.getService(sr);
                    pw.println(sm.sayHello());
                    bundleContext.ungetService(sr);
                }
            } else {
                pw.println("Bundle Context is Null");
            }
         
            //JNDI Lookup via osgi:service
            HelloService sm = (HelloService) getOSGIService(HelloService.class.getName(),null);
            if(sm != null){
                pw.println(sm.sayHello());
            }else {
                pw.println("Service Lookup is Null");
            }
           
          
View Full Code Here

Examples of org.apache.geronimo.testsuite.aries.ejb.api.HelloService

            bundleContext = (BundleContext) sc.getAttribute("osgi-bundlecontext");
            PrintWriter pw = response.getWriter();
            if (bundleContext != null) {
                ServiceReference sr = bundleContext.getServiceReference(HelloService.class.getName());
                if (sr != null) {
                    HelloService sm = (HelloService) bundleContext.getService(sr);
                    pw.println(sm.sayHello());
                    bundleContext.ungetService(sr);
                }              
            } else {
                pw.println("Bundle Context is Null");
            }
           
          //JNDI Lookup via osgi:service
            HelloService sm = (HelloService) getOSGIService(HelloService.class.getName(),null);
            if(sm != null){
                pw.println(sm.sayHello());
            }else {
                pw.println("Service Lookup is Null");
            }
           
         
View Full Code Here

Examples of org.jboss.as.quickstarts.mbeanhelloworld.service.HelloService

    }

    @Override
    public String sayHello(String name) {
        count.incrementAndGet();
        HelloService helloService = CDIExtension.getBean(HelloService.class);
        return helloService.createHelloMessage(welcomeMessage, name);
    }
View Full Code Here

Examples of org.ops4j.pax.exam.sample9.pde.HelloService

        String language = System.getProperty("pax.exam.language");
        String expected = (language.equals("en")) ? "Hello Pax!" : "Pax Vobiscum!";
        assertThat(bundleContext, is(notNullValue()));
        Map<String, String> props = new HashMap<String, String>();
        props.put("language", language);
        HelloService service = ServiceLookup.getService(bundleContext, HelloService.class, props);
        assertThat(service, is(notNullValue()));
        assertThat(service.getMessage(), is(expected));
    }
View Full Code Here

Examples of org.something.services.hello.ws.HelloService

   * Remote as in localhost HTTP call; the test starts a local (embedded Jetty) for this.
   *
   * @throws Exception
   */
  public void testViaXFireServer() throws Exception {
    HelloService remoteHelloService = getClient();
    XFireExporter exporter = (XFireExporter) serverCtx.getBean("hello.server");

    // Use XFire-specific XFireHttpServer; JAX-WS javax.xml.ws.Endpoint doesn't work... ;-(
    XFireHttpServer httpServer = this.startXFireServer(LOCALHOST_PORT, exporter);
    // Endpoint httpServer = Endpoint.publish(LOCALHOST_URL, exporter.getServiceBean());
View Full Code Here

Examples of org.something.services.hello.ws.HelloService

   
    return server;
 
 
  private HelloService getClient() {
    HelloService remoteHelloService = (HelloService) remoteClientCtx.getBean("hello.client");
    // Change the URL ('Service Endpoint') of the remote service
    Client client = ((XFireProxy) Proxy.getInvocationHandler(remoteHelloService)).getClient();
    client.setUrl(LOCALHOST_URL);
    return remoteHelloService;
  }
View Full Code Here

Examples of uri.helloworld.HelloService

                + "<ns2:HelloResponse xmlns:ns2='uri:HelloWorld'><text>helloffang</text></ns2:HelloResponse></jbi:part></jbi:message>");
        jbi.activateComponent(echo, "echo");

        URL wsdl = getClass().getResource("/HelloWorld-DOC.wsdl");
        assertNotNull(wsdl);
        HelloService helloService = new HelloService(wsdl, serviceName);
        HelloPortType port = helloService.getHelloPort();
        Client client = ClientProxy.getClient(port);
        client.getInInterceptors().add(new LoggingInInterceptor());
        HelloRequest req = new HelloRequest();
        req.setText("hello");
        HelloHeader header = new HelloHeader();
View Full Code Here

Examples of uri.helloworld.HelloService

        seComp.setEndpoints(new CxfSeEndpoint[] {endpoint});
        jbi.activateComponent(seComp, "servicemix-cxfse");
        URL wsdl = getClass().getResource("/HelloWorld-DOC.wsdl");
        assertNotNull(wsdl);
        HelloService helloService = new HelloService(wsdl, serviceName);
        HelloPortType port = helloService.getHelloPort();
        HelloRequest req = new HelloRequest();
        req.setText("hello");
        HelloHeader header = new HelloHeader();
        header.setId("ffang");
        HelloResponse rep = port.hello(req, header);
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.