Package org.apache.tuscany.sca.host.embedded

Examples of org.apache.tuscany.sca.host.embedded.SCADomain


            jmsBroker.setPersistent(false);
            jmsBroker.setUseJmx(false);
            jmsBroker.addConnector("tcp://localhost:61619");
            jmsBroker.start();
           
            SCADomain scaDomain = SCADomain.newInstance("helloworldjmsservice.composite");

            System.out.println("HelloWorld server started (press enter to shutdown)");
            System.in.read();

            scaDomain.close();
           
            jmsBroker.stop();
            System.out.println("HelloWorld server stopped");
       
        } catch (IOException e) {
View Full Code Here


*/
public class HelloWorldServer {

    public static void main(String[] args) {

        SCADomain scaDomain = SCADomain.newInstance("META-INF/sca-deployables/helloworldws.composite");

        try {
            System.out.println("HelloWorld server started (press enter to shutdown)");
            System.in.read();
        } catch (IOException e) {
            e.printStackTrace();
        }

        scaDomain.close();
        System.out.println("HelloWorld server stopped");
    }
View Full Code Here

*/
public class BigBankClient {

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

        SCADomain domain = SCADomain.newInstance("BigBank.composite");
        AccountService accountService = domain.getService(AccountService.class, "AccountService");

        System.out.println("EUR: " + accountService.getTotalValue());
    }
View Full Code Here

    }

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

        BrokerService broker = startBroker();
        SCADomain scaDomain = SCADomain.newInstance("helloworldwsjms.composite");

        try {
            System.out.println("HelloWorld server started (press enter to shutdown)");
            System.in.read();
        } catch (IOException e) {
            e.printStackTrace();
        }

        scaDomain.close();
        broker.stop();
        System.out.println("HelloWorld server stopped");
        // FIXME: Workaround for http://issues.apache.org/jira/browse/AXIS2-3685
        System.exit(0);
    }
View Full Code Here

import org.apache.tuscany.sca.host.embedded.SCADomain;

public class LaunchFeedServer {
    public static void main(String[] args) throws Exception {
        SCADomain scaDomain = SCADomain.newInstance("FeedAggregator.composite");

        try {
            System.out.println("Sample Feed server started (press enter to shutdown)");
            System.out.println();
            System.out.println("To read the aggregated feeds, point your Web browser to the following addresses:");
            System.out.println("http://localhost:8083/atomAggregator");
            System.out.println("http://localhost:8083/atomAggregator/atomsvc (for the Atom service document)");
            System.out.println("http://localhost:8083/rssAggregator");
            System.out.println();
            System.in.read();
        } catch (IOException e) {
            e.printStackTrace();
        }


        scaDomain.close();
        System.out.println("Sample Feed server stopped");
    }
View Full Code Here

* @version $Rev: 538844 $ $Date: 2007-05-17 10:12:08 +0100 (Thu, 17 May 2007) $
*/
public class EchoDataBindingClient {
    public static void main(String[] args) throws Exception {

        SCADomain scaDomain  = SCADomain.newInstance("EchoDataBinding.composite");
       
        Interface1 componentA = scaDomain.getService(Interface1.class, "ComponentA");
        String response = componentA.call("<message><foo>123</foo></message>");
        String response1= componentA.call1("<message><foo>123</foo></message>");
       
       
        System.out.println("call  response = " + response );
        System.out.println("call1 response = " + response1 );
      
        scaDomain.close();

    }
View Full Code Here

*/
public class EchoBindingClient {
   
    public static void main(String[] args) throws Exception {

        SCADomain scaDomain  = SCADomain.newInstance("EchoBinding.composite");
       
        // Call the echo service component which will, in turn, call a reference
        // with an echo binding. The echo binding will echo the given string.
        Echo service = scaDomain.getService(Echo.class, "EchoComponent");
        String echoString = service.echo("foo");
        System.out.println("Echo reference = " + echoString );

        // Call the echo server. This will dispatch the call to a service with an
        // echo binding. The echo binding will pass the call to the echo component.
        echoString = EchoServer.getServer().sendReceive("http://example.com/temp", "bar");
        System.out.println("Echo service = " + echoString );
       
        scaDomain.close();

    }
View Full Code Here

* @version $Rev: 613905 $ $Date: 2008-01-21 14:41:15 +0000 (Mon, 21 Jan 2008) $
*/
public class BPELClient {
    public static void main(String[] args) throws Exception {

        SCADomain scaDomain = SCADomain.newInstance("helloworld.composite");
        HelloPortType bpelService = scaDomain.getService(HelloPortType.class, "BPELHelloWorldComponent");
       
        String result = bpelService.hello("Hello");
        System.out.println(result);
       
        scaDomain.close();

        System.exit(0);
    }
View Full Code Here

        } catch (java.lang.SecurityException e) {
            System.setProperty("java.security.auth.login.config", CalculatorClient.class.getClassLoader()
                .getResource("CalculatorJass.config").toString());
        }

        SCADomain scaDomain = SCADomain.newInstance("Calculator.composite");
       
        CalculatorService calculatorService =
            scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent");

        // Calculate
        System.out.println("Calling CalculatorServiceComponent configured with 'logging' " +
                "policy for subtract and divide operations...");
        System.out.println("3 + 2=" + calculatorService.add(3, 2));
        System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
        System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
        System.out.println("3 / 2=" + calculatorService.divide(3, 2));
       
        calculatorService =
            scaDomain.getService(CalculatorService.class, "AnotherCalculatorServiceComponent");

        // Calculate
        System.out.println("Calling CalculatorServiceComponent configured with 'logging' " +
                "for all operations in the implementation...");
        System.out.println("3 + 2=" + calculatorService.add(3, 2));
        System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
        System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
        System.out.println("3 / 2=" + calculatorService.divide(3, 2));

        scaDomain.close();
    }
View Full Code Here

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

        System.out.println("Starting the BigBank Service...");

        SCADomain domain = SCADomain.newInstance("http://localhost", "/", "BigBank.composite");

        System.out.println("Press Enter to Exit...");
        System.in.read();

        domain.close();
        System.out.println("Bye");
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.host.embedded.SCADomain

Copyright © 2018 www.massapicom. 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.