summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-02-08 08:35:54 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-02-08 08:35:54 +0000
commit20c7c74bfefcddc0b89cc4ff3518c5bd8f775b7f (patch)
tree01b0a78118e41547b43d6864bfb885b947d2021a /java
parent6ed2fe9f18a849804ca8364ee98b2f50882a518f (diff)
Adding sca-contribution to allow same sample client to run from ant and command line without modifications plus some updates to README
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@742021 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--java/sca/samples/binding-ws-calculator/README4
-rw-r--r--java/sca/samples/binding-ws-calculator/src/main/java/sample/SampleClientImpl.java5
-rw-r--r--java/sca/samples/binding-ws-calculator/src/main/resources/META-INF/sca-contribution.xml23
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