summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-01-28 00:38:17 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-01-28 00:38:17 +0000
commit35535ed5b40118aec7514fe7e691fd4087138690 (patch)
tree66e6f3c206b43b9df71a2c2a4ae263c548107d35 /java/sca
parent2ee3d7643870a91df79d091fe356a396fcf15ba7 (diff)
Fix the port #
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@738322 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/samples/binding-ws-calculator/src/main/java/calculator/CalculatorClient.java14
-rw-r--r--java/sca/samples/binding-ws-calculator/src/main/resources/Calculator.composite4
2 files changed, 11 insertions, 7 deletions
diff --git a/java/sca/samples/binding-ws-calculator/src/main/java/calculator/CalculatorClient.java b/java/sca/samples/binding-ws-calculator/src/main/java/calculator/CalculatorClient.java
index c193b2ce66..af01e58e62 100644
--- a/java/sca/samples/binding-ws-calculator/src/main/java/calculator/CalculatorClient.java
+++ b/java/sca/samples/binding-ws-calculator/src/main/java/calculator/CalculatorClient.java
@@ -42,11 +42,15 @@ public class CalculatorClient {
public void calculate() {
// Calculate
- System.out.println("SCA API ClassLoader: " + print(Reference.class.getClassLoader()));
- 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));
+ try {
+ System.out.println("SCA API ClassLoader: " + print(Reference.class.getClassLoader()));
+ 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));
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
}
private static String print(ClassLoader cl) {
diff --git a/java/sca/samples/binding-ws-calculator/src/main/resources/Calculator.composite b/java/sca/samples/binding-ws-calculator/src/main/resources/Calculator.composite
index 04ea0a259b..d27d09cb8e 100644
--- a/java/sca/samples/binding-ws-calculator/src/main/resources/Calculator.composite
+++ b/java/sca/samples/binding-ws-calculator/src/main/resources/Calculator.composite
@@ -25,7 +25,7 @@
<component name="CalculatorServiceComponent">
<implementation.java class="calculator.CalculatorServiceImpl"/>
<reference name="addService" >
- <binding.ws uri="http://localhost:8085/sample-calculator-ws-webapp/AddServiceComponent"/>
+ <binding.ws uri="http://localhost:8085/AddServiceComponent"/>
</reference>
<reference name="subtractService" target="SubtractServiceComponent" />
<reference name="multiplyService" target="MultiplyServiceComponent" />
@@ -35,7 +35,7 @@
<component name="AddServiceComponent">
<implementation.java class="calculator.AddServiceImpl"/>
<service name="AddService">
- <binding.ws/>
+ <binding.ws uri="http://localhost:8085/AddServiceComponent"/>
</service>
</component>