Package org.apache.tuscany.core.client

Examples of org.apache.tuscany.core.client.TuscanyRuntime.start()


    public void stop() {
    }

    public static void main(String[] args) throws Exception {
        TuscanyRuntime tuscany = new TuscanyRuntime("bigbank.account.testclient", null);
        tuscany.start();
        ModuleContext moduleContext = CurrentModuleContext.getContext();

        AccountService accountService = (AccountService) moduleContext.locateService("AccountServiceComponent");

        AccountReport accountReport = accountService.getAccountReport(12345);
View Full Code Here


    public void stop() {
    }

    public static void main(String[] args) throws Exception {
        TuscanyRuntime tuscany = new TuscanyRuntime("bigbank.webclient.testclient", null);
        tuscany.start();
        ModuleContext moduleContext = CurrentModuleContext.getContext();

        AccountService accountService = (AccountService) moduleContext.locateService("AccountServiceComponent");

        AccountReport report = accountService.getAccountReport(12345);
View Full Code Here

        // Create a Tuscany runtime for the sample module component
        TuscanyRuntime tuscany = new TuscanyRuntime("HelloWorldModuleComponent", "http://helloworld", monitorFactory);

        // Start the Tuscany runtime and associate it with this thread
        tuscany.start();

        // Get the SCA module context.
        ModuleContext moduleContext = CurrentModuleContext.getContext();

        // Locate the HelloWorld service
View Full Code Here

    public static void main(String[] args) throws Exception {


        TuscanyRuntime tuscany = new TuscanyRuntime("bigbank.webclient.testclient", null);
        tuscany.start();
        ModuleContext moduleContext = CurrentModuleContext.getContext();
        LoginService loginService = (LoginService)
                moduleContext.locateService("LoginServiceComponent");

        if (loginService.login("test", "password") == LoginService.SUCCESS)
View Full Code Here

       
        // Create a Tuscany runtime for the sample module component
        TuscanyRuntime tuscany = new TuscanyRuntime("HelloWorldModuleComponent", "http://helloworld");

        // Start the Tuscany runtime and associate it with this thread
        tuscany.start();


        System.out.println("Hit ENTER to exit");
        System.in.read();
View Full Code Here

public class HelloWorldMCTestCase extends TestCase {
    private ClassLoader oldCL;

    public void testHelloWorld() throws Exception {
        TuscanyRuntime tuscany = new TuscanyRuntime("test", "foo");
        tuscany.start();
        ModuleContext moduleContext = CurrentModuleContext.getContext();
        assertNotNull(moduleContext);
        assertEquals("foo", moduleContext.getURI());
        HelloWorldService helloworldService = (HelloWorldService) moduleContext.locateService("HelloWorld");
        assertNotNull(helloworldService);
View Full Code Here

        // Create a Tuscany runtime for the sample module component
        TuscanyRuntime tuscany = new TuscanyRuntime("CustomerInfoModuleComponent", "http://customerinfo", monitorFactory);

        // Start the Tuscany runtime and associate it with this thread
        tuscany.start();

        // Get the SCA module context.
        ModuleContext moduleContext = CurrentModuleContext.getContext();

        // Locate the CustomerInfo service
View Full Code Here

       
        // Create a Tuscany runtime for the sample module component
        TuscanyRuntime tuscany = new TuscanyRuntime("HelloWorldModuleComponent", "http://helloworld");

        // Start the Tuscany runtime and associate it with this thread
        tuscany.start();

        // Get the SCA module context.
        ModuleContext moduleContext = CurrentModuleContext.getContext();

        // Locate the HelloWorld service
View Full Code Here

        // Create a Tuscany runtime for the sample module component
        TuscanyRuntime tuscany = new TuscanyRuntime("CalculatorModuleComponent", "http://calculator", monitorFactory);

        // Start the Tuscany runtime and associate it with this thread
        tuscany.start();

        // Get the SCA module context.
        ModuleContext moduleContext = CurrentModuleContext.getContext();
       
        // Locate the Calculator service
View Full Code Here

    public void testGetQuote() throws ConfigurationException, SecurityException, NoSuchMethodException, IllegalArgumentException,
            IllegalAccessException, InvocationTargetException {

        TuscanyRuntime tuscany = new TuscanyRuntime("getQuote", null);
        tuscany.start();
        ModuleContext moduleContext = CurrentModuleContext.getContext();

        Object serviceProxy = moduleContext.locateService("webserviceXSQ");
        Method m = serviceProxy.getClass().getMethod("GetQuote", new Class[] { String.class });
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.