The Eclipse SOA Tools Platform (STP) plug-in and Apache Tuscany simplifies services development through the use of the popular Eclipse development environment. Apache Tuscany has also been integrated with the STP to provide a Service Component Architecture (SCA) Java run time for the services you create, allowing you to annotate your service using the SCA standard and Apache Tuscany annotations. In this tutorial, you will see STP and Apache Tuscany in action, through the creation of a Remote Method Invocation (RMI) service.
/** * Instantiate the generated Service */ CalculatorService service = new CalculatorService(); /** * Get the port using port getter method generated in CaculatorService */ Calculator calculatorProxy = service.getCalculatorPort(); /** * Invoke the remote method */ int result = calculatorProxy.add(10, 20); System.out.println("Sum of 10+20 = "+result); }