Examples of HelloWorldService


Examples of org.apache.geronimo.test.ws.HelloWorldService

          out.println("<font align=Center face=\"Garamond\"> Check JMS Resource Reference : Got Queue Connection ->"+qCon+" </font><br>");
         
          Queue q = (Queue) ctx.lookup("java:comp/env/jms/SendReceiveQueue");
          out.println("<font align=Center face=\"Garamond\"> Check JMS Resource Env Reference : Got Queue ->"+q.getQueueName()+" </font><br>");
         
          HelloWorldService hello = (HelloWorldService) ctx.lookup("java:comp/env/service/HelloWorldService");
          HelloWorld port = hello.getHelloWorld();
          out.println("<font align=Center face=\"Garamond\"> Check Service Reference : Called Web Service ->"+port.getHelloWorld("Test")+" </font><br>");
      
      TestLocalHome resultLocal = (TestLocalHome)ctx.lookup("java:comp/env/ejb/TestLocalBean");
      TestLocal testLocal = resultLocal.create();
      String echoLocal = testLocal.echoLocal("Test");
View Full Code Here

Examples of org.apache.hello_world.HelloWorldService

            running = true;
            waitForEndpointActivation();
            do {
                System.out.println("getting service");
                   
                HelloWorldService service = new HelloWorldService();
                System.out.println("got service");
                Greeter g = service.getSoapPort();
                System.out.println("invoking method");
                   
                String ret = g.greetMe("ffang");

                System.out.println("greetMe service says: " + ret);
View Full Code Here

Examples of org.apache.hello_world.jbi.HelloWorldService

            (JBITransportFactory)bus.getExtension(ConduitInitiatorManager.class).
                getConduitInitiator(CXFServiceEngine.JBI_TRANSPORT_ID);
        jbiTransportFactory.setBus(bus);
       
        jbiTransportFactory.setDeliveryChannel(channel);
        HelloWorldService ss = new HelloWorldService(wsdl, serviceName);
       
        Greeter port = ss.getSoapPort();
        Object implementor = new GreeterImpl();
        String address = "http://foo/bar/baz";
        EndpointImpl e = (EndpointImpl)Endpoint.publish(address, implementor);
        e.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
        e.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
View Full Code Here

Examples of org.apache.hello_world.nmr.HelloWorldService

                S1, S2 });
        ConfigurerImpl cfg = new ConfigurerImpl(ctx);
        Bus bus = (Bus) ctx.getBean(Bus.DEFAULT_BUS_ID);
        bus.setExtension(cfg, Configurer.class);
       
        HelloWorldService ss = new HelloWorldService(wsdl, serviceName);
        QName portName = new QName("http://apache.org/hello_world/nmr", "SoapPort");
        ss.addPort(portName, NMRConstants.NS_NMR_BINDING, "local://nmrendpoint");
       
        Greeter port = ss.getPort(portName, Greeter.class);
               
        String rep = port.greetMe("ffang");
        assertEquals(rep, "Hello ffang");
        rep = port.sayHi();
        assertEquals(rep, "Bonjour");
View Full Code Here

Examples of org.apache.hello_world_soap_http.HelloWorldService

        QName portName = getPortName(new QName(
                "http://apache.org/hello_world_soap_http", "HelloWorldPort"));
       
        assertNotNull(wsdl);

        HelloWorldService service = new HelloWorldService(wsdl, serviceName);
        assertNotNull(service);

        String response1 = new String("Hello Milestone-");
        String response2 = new String("Bonjour");
        try {
            Greeter greeter = service.getPort(portName,
                    Greeter.class);
            for (int idx = 0; idx < 5; idx++) {
                String greeting = greeter.greetMe("Milestone-" + idx);
                assertNotNull("no response received from service", greeting);
                String exResponse = response1 + idx;
View Full Code Here

Examples of org.apache.tuscany.container.java.assembly.mock.HelloWorldService

        CompositeContext child = (CompositeContext) runtime.getRootContext().getContext("test.module");
        child.registerModelObject(MockFactory.createModuleWithEntryPointToExternalService());
        child.publish(new ModuleStart(this));
        Object id = new Object();
        child.publish(new RequestStart(this, id));
        HelloWorldService service1 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals("foo", service1.hello("foo"));

        child.publish(new RequestEnd(this, id));
        child.publish(new ModuleStop(this));
        runtime.stop();
View Full Code Here

Examples of org.apache.tuscany.container.java.assembly.mock.HelloWorldService

        registry.registerTargetBuilder(interceptorBuilder);
        runtime.getRootContext().registerModelObject(MockFactory.createCompositeComponent("test.module"));
        CompositeContext child = (CompositeContext) runtime.getRootContext().getContext("test.module");
        child.registerModelObject(MockFactory.createModuleWithExternalService());
        child.publish(new ModuleStart(this));
        HelloWorldService source = (HelloWorldService) child.getContext("source").getInstance(null);
        Assert.assertNotNull(source);
        Assert.assertEquals(0, mockInterceptor.getCount());
        Assert.assertEquals("foo", source.hello("foo"));
        Assert.assertEquals(1, mockInterceptor.getCount());
        child.publish(new ModuleStop(this));
        runtime.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.container.java.assembly.mock.HelloWorldService

        handler = (InvocationHandler) ctx.getHandler();
        Assert.assertEquals(1, mockInterceptor.getCount());
        response = handler.invoke(null, hello, new Object[]{"foo"});
        Assert.assertEquals("Hello foo", response);
        Assert.assertEquals(2, mockInterceptor.getCount());
        HelloWorldService service1 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals(2, service1.count());
        child.publish(new RequestEnd(this, id3));

        child.publish(new ModuleStop(this));
        runtime.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.container.java.assembly.mock.HelloWorldService

        EntryPointContext ctx2 = (EntryPointContext) child.getContext("source");
        Assert.assertNotNull(ctx2);
        response = handler.invoke(null, hello, new Object[]{"foo"});
        Assert.assertEquals("Hello foo", response);
        Assert.assertEquals(2, mockInterceptor.getCount());
        HelloWorldService service1 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals(2, service1.count());
        child.publish(new RequestEnd(this, id2));
        child.publish(new HttpSessionEnd(this, session));

        // second session
        Object session2 = new Object();
        child.publish(new RequestStart(this, new Object()));
        child.publish(new HttpSessionBound(this, session2));

        ctx = (EntryPointContext) child.getContext("source");
        Assert.assertNotNull(ctx);
        Assert.assertEquals(2, mockInterceptor.getCount());
        response = handler.invoke(null, hello, new Object[]{"foo"});
        Assert.assertEquals("Hello foo", response);
        Assert.assertEquals(3, mockInterceptor.getCount());
        child.publish(new HttpSessionBound(this, session2));

        Object id3 = new Object();
        child.publish(new RequestStart(this, id3));
        child.publish(new HttpSessionBound(this, session2));
        ctx2 = (EntryPointContext) child.getContext("source");
        Assert.assertNotNull(ctx2);
        response = handler.invoke(null, hello, new Object[]{"foo"});
        Assert.assertEquals("Hello foo", response);
        Assert.assertEquals(4, mockInterceptor.getCount());
        HelloWorldService service2 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals(2, service2.count());
        Assert.assertEquals(2, service1.count()); //ensure sessions not crossed
        child.publish(new RequestEnd(this, session2));
        child.publish(new HttpSessionBound(this, session2));

        child.publish(new ModuleStop(this));
View Full Code Here

Examples of org.apache.tuscany.container.java.assembly.mock.HelloWorldService

        handler = (InvocationHandler) ctx.getHandler();
        Assert.assertEquals(1, mockInterceptor.getCount());
        response = handler.invoke(null, hello, new Object[]{"foo"});
        Assert.assertEquals("Hello foo", response);
        Assert.assertEquals(2, mockInterceptor.getCount());
        HelloWorldService service1 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals(0, service1.count());
        child.publish(new RequestEnd(this, id));

        child.publish(new ModuleStop(this));
        runtime.stop();
    }
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.