diff options
Diffstat (limited to '')
3 files changed, 27 insertions, 5 deletions
diff --git a/java/sca/samples/binding-ws-calculator/README b/java/sca/samples/binding-ws-calculator/README index ceb532faed..fb5afcc7ec 100644 --- a/java/sca/samples/binding-ws-calculator/README +++ b/java/sca/samples/binding-ws-calculator/README @@ -13,11 +13,11 @@ ant run OR if you don't have ant, on Windows do -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient +java -cp ..\..\features\tuscany-sca-manifest.jar;target\sample-binding-ws-calculator.jar sample.SampleClientImpl and on *nix do -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient +java -cp ../../features/tuscany-sca-manifest.jar:target/sample-binding-ws-calculator.jar sample.SampleClientImpl Sample Overview --------------- diff --git a/java/sca/samples/binding-ws-calculator/src/main/java/sample/SampleClientImpl.java b/java/sca/samples/binding-ws-calculator/src/main/java/sample/SampleClientImpl.java index 4ac4f4b585..3f6ecfdb03 100644 --- a/java/sca/samples/binding-ws-calculator/src/main/java/sample/SampleClientImpl.java +++ b/java/sca/samples/binding-ws-calculator/src/main/java/sample/SampleClientImpl.java @@ -19,7 +19,6 @@ package sample; -import org.apache.tuscany.sca.node.Contribution; import org.apache.tuscany.sca.node.Node; import org.apache.tuscany.sca.node.NodeFactory; @@ -29,8 +28,8 @@ import org.apache.tuscany.sca.node.NodeFactory; */ public class SampleClientImpl { public static void main(String[] args) throws Exception { - Node node = NodeFactory.newInstance().createNode("Calculator.composite", - new Contribution("c1", "target/classes")); + Node node = NodeFactory.newInstance().createNode(); + node.start(); SampleClient sampleClient = node.getService(SampleClient.class, "SampleClient"); diff --git a/java/sca/samples/binding-ws-calculator/src/main/resources/META-INF/sca-contribution.xml b/java/sca/samples/binding-ws-calculator/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..8b60ae590c --- /dev/null +++ b/java/sca/samples/binding-ws-calculator/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:Calculator"/>
+</contribution>
\ No newline at end of file |