Examples of HelloWorldService


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

        ctx = (EntryPointContext) child.getContext("source");
        Assert.assertNotNull(ctx);
        handler = (InvocationHandler) ctx.getHandler();
        response = handler.invoke(null, hello, new Object[]{"foo"});
        HelloWorldService service1 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals(2, service1.count());

        child.publish(new RequestEnd(this, id));

        // second request
        Object id2 = new Object();
        child.publish(new RequestStart(this, id2));
        ctx = (EntryPointContext) child.getContext("source");
        Assert.assertNotNull(ctx);
        handler = (InvocationHandler) ctx.getHandler();
        Assert.assertEquals(2, mockInterceptor.getCount());
        response = handler.invoke(null, hello, new Object[]{"foo"});
        Assert.assertEquals("Hello foo", response);
        Assert.assertEquals(3, mockInterceptor.getCount());
        HelloWorldService service2 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals(1, service2.count());
        child.publish(new RequestEnd(this, id2));

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

Examples of org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldService

        node.start();
    }

    @Test
    public void testHelloWorldCreate() throws Exception {
        HelloWorldService helloWorldService = ((SCAClient)node).getService(HelloWorldService.class, "HelloWorldReferenceComponent");
       
        assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs"));
       
        Person person = new Person();
        person.setFirstName("Fred");
        person.setLastName("Bloggs");
        assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs", helloWorldService.getPersonGreetings(person));
       
        // this just makes sure that there are no exceptions thrown for this case
        helloWorldService.nullInVoidOut();
        Assert.assertEquals(4, HelloWorldServiceImpl.nullInVoidOutCalled);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldService

        node.start();
    }

    @Test
    public void testHelloWorldCreate() throws Exception {
        HelloWorldService helloWorldService = ((SCAClient)node).getService(HelloWorldService.class, "HelloWorldReferenceComponent");
       
        assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs"));
       
        Person person = new Person();
        person.setFirstName("Fred");
        person.setLastName("Bloggs");
        assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs", helloWorldService.getPersonGreetings(person));
    }
View Full Code Here

Examples of org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld.HelloWorldService

    }

    @Test
    @Ignore("TUSCANY-3654")
    public void testHelloWorldCreate() throws Exception {
        HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldReferenceComponent");
       
        assertEquals("Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs"));
       
        Person person = new Person();
        person.setFirstName("Fred");
        person.setLastName("Bloggs");
        assertEquals("Hello Fred Bloggs", helloWorldService.getPersonGreetings(person));
    }
View Full Code Here

Examples of org.g4studio.demo.local.rpc.webservice.HelloWorldService

    sayHello();
    queryBalanceInfo();
  }
 
  private static void sayHello(){
    HelloWorldService helloWorldService = (HelloWorldService)SpringBeanLoader.getSpringBean("client_webservice");
    String outString = helloWorldService.sayHello("Lily!");
    System.out.println(outString);
  }
View Full Code Here

Examples of org.objectweb.celtix.hello_world_jms.HelloWorldService

                                 "HelloWorldService");
        portName = new QName("http://celtix.objectweb.org/hello_world_jms", "HelloWorldPort");
        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
        assertNotNull(wsdl);

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

        String response1 = new String("Hello Milestone-");
        String response2 = new String("Bonjour");
        try {
            HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.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;
                assertEquals(exResponse, greeting);
View Full Code Here

Examples of org.objectweb.celtix.hello_world_jms.HelloWorldService

                                 "HelloWorldService");
        portName = new QName("http://celtix.objectweb.org/hello_world_jms", "HelloWorldPort");
        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
        assertNotNull(wsdl);

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

        try {
            HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.class);
            InvocationHandler handler  = Proxy.getInvocationHandler(greeter);
            BindingProvider  bp = null;
           
            if (handler instanceof BindingProvider) {
                bp = (BindingProvider)handler;
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.HelloWorldService

            System.exit(1);
        }

        File wsdl = new File(args[0]);

        HelloWorldService ss = new HelloWorldService(wsdl.toURL(), SERVICE_NAME);
        HelloWorldServiceSoap port = ss.getHelloWorldServiceSoap();

        String resp;

        System.out.println("Invoking sayHi...");
        resp = port.sayHi();
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.HelloWorldService

                System.exit(1);
            }

            File wsdl = new File(args[0]);
       
            HelloWorldService ss = new HelloWorldService(wsdl.toURL(), SERVICE_NAME);
            Greeter port = ss.getSoapPort();
            String resp;

            System.out.println("Invoking sayHi...");
            resp = port.sayHi();
            System.out.println("Server responded with: " + resp);
View Full Code Here

Examples of us.codecraft.tinyioc.HelloWorldService

public class ApplicationContextTest {

    @Test
    public void test() throws Exception {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("tinyioc.xml");
        HelloWorldService helloWorldService = (HelloWorldService) applicationContext.getBean("helloWorldService");
        helloWorldService.helloWorld();
    }
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.