tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r552520 - in /incubator/tuscany/java/sca/samples/simple-callback-ws: ./ src/ src/main/ src/main/java/ src/main/java/simplecallback/ src/main/resources/ src/main/resources/wsdl/ src/test/ src/test/java/ src/test/java/simplecallback/
Date Mon, 02 Jul 2007 15:55:00 GMT
Author: antelder
Date: Mon Jul  2 08:54:59 2007
New Revision: 552520

URL: http://svn.apache.org/viewvc?view=rev&rev=552520
Log:
TUSCANY-1341, apply patch from Simon Nash, for sample using callbacks with ws, doesn't work yet so not in the build

Added:
    incubator/tuscany/java/sca/samples/simple-callback-ws/   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/README   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/build.xml   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/pom.xml   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/simple-callback-ws.png   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/simple-callback-ws.svg
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/simplecallback.composite
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/wsdl/
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl   (with props)
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/test/
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/test/java/
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/test/java/simplecallback/
    incubator/tuscany/java/sca/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java   (with props)

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Jul  2 08:54:59 2007
@@ -0,0 +1,17 @@
+dojo
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+derby.log
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+.felix
+

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/README
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/README?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/README (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/README Mon Jul  2 08:54:59 2007
@@ -0,0 +1,134 @@
+Simple Callback Sample Using Web Services
+=========================================
+This sample demonstrates asynchronous messaging using a callback over the
+Web Service binding.  It is very similar to the simple-callback sample.
+The only differences are that simplecallback.composite has been updated
+to use the Web Service binding, and there is a simplecallback.wsdl file.
+
+The README in the samples directory (the directory above this) provides 
+general instructions about building and running samples. Take a look there 
+first. 
+
+If you just want to run it to see what happens open a command prompt, navigate
+to this sample directory and do:
+
+ant run
+
+OR if you don't have ant, on Windows do
+
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-simple-callback.jar simplecallback.SimpleCallbackClient
+
+and on *nix do
+
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-simple-callback.jar simplecallback.SimpleCallbackClient
+
+
+Sample Overview
+---------------
+The sample provides a single composite with two components. MyClientComponent is 
+wired to MyServiceComponent. The interface of MyServiceComponent describes one
+method as ONEWAY and with a callback semantic. When a message passes from 
+client to service the response is returned via the callback asynchronously.  
+
+simple-callback/
+  src/
+    main/
+      java/
+        simplecallback/
+          MyClient.java           - client interface 
+          MyClientImpl.java       - implements the client and service callback
+                                    interfaces
+          MyService.java          - service interface
+          MyServiceCallback.java  - service callback interface, implemented by the 
+                                    client
+          MyServiceImpl.java      - implements the service interface
+          SimpleCallbackClient.java - starts the SCA Runtime and 
+                                    deploys the simplecallback.composite. 
+                                    It then calls MyClientComponent which in turn
+                                    calls MyServiceComponent
+      resources/
+        simplecallback.composite  - the SCA assembly for this sample
+        wsdl/
+          simplecallback.wsdl     - the service description and callback binding  
+    test/
+      java/
+        simplecallback/
+          SimpleCallbackTestCase.java - JUnit test case 
+  simple-callback.png             - a pictorial representation of the sample 
+                                    .composite file
+  build.xml                       - the Ant build file
+  pom.xml                         - the Maven build file        
+
+Building And Running The Sample Using Ant
+-----------------------------------------
+With the binary distribution the sample can be built and run using Ant as 
+follows
+
+cd simple-callback-ws
+ant compile
+ant run
+
+You should see the following output from the run target.
+
+run:
+     [java] log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAXUtils).
+     [java] log4j:WARN Please initialize the log4j system properly.
+     [java] Main thread Thread[main,5,main]
+     [java] aClientMethod on thread Thread[main,5,main]
+     [java] setMyServiceCallback on thread Thread[pool-1-thread-3,5,main]
+     [java] someMethod on thread Thread[pool-1-thread-3,5,main]
+     [java] receiveResult on thread Thread[Axis2 Task,5,main]
+     [java] Result: -> someMethod -> receiveResult
+     [java] aClientMethod return from someMethod on thread Thread[main,5,main]
+
+Building And Running The Sample Using Maven 
+-------------------------------------------
+With either the binary or source distributions the sample can be built and run 
+using Maven as follows. 
+
+cd simple-callback-ws
+mvn
+
+You should see the following output from the test phase.
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running simplecallback.SimpleCallbackTestCase
+log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAXUtils).
+log4j:WARN Please initialize the log4j system properly.
+01-Jul-2007 21:20:06 org.apache.catalina.core.StandardEngine start
+INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
+01-Jul-2007 21:20:07 org.apache.catalina.startup.ContextConfig defaultWebConfig
+INFO: No default web.xml
+01-Jul-2007 21:20:07 org.apache.catalina.startup.DigesterFactory register
+WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd
+01-Jul-2007 21:20:07 org.apache.catalina.startup.DigesterFactory register
+WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd
+01-Jul-2007 21:20:07 org.apache.catalina.startup.DigesterFactory register
+WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd
+01-Jul-2007 21:20:07 org.apache.catalina.startup.DigesterFactory register
+WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd
+01-Jul-2007 21:20:07 org.apache.catalina.startup.DigesterFactory register
+WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xsd
+01-Jul-2007 21:20:07 org.apache.coyote.http11.Http11Protocol init
+INFO: Initializing Coyote HTTP/1.1 on http-8080
+01-Jul-2007 21:20:07 org.apache.coyote.http11.Http11Protocol start
+INFO: Starting Coyote HTTP/1.1 on http-8080
+Main thread Thread[main,5,main]
+aClientMethod on thread Thread[main,5,main]
+setMyServiceCallback on thread Thread[pool-1-thread-1,5,main]
+someMethod on thread Thread[pool-1-thread-1,5,main]
+aClientMethod return from someMethod on thread Thread[main,5,main]
+Sleeping ...
+receiveResult on thread Thread[Axis2 Task,5,main]
+Result: -> someMethod -> receiveResult
+01-Jul-2007 21:20:08 org.apache.coyote.http11.Http11Protocol destroy
+INFO: Stopping Coyote HTTP/1.1 on http-8080
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.525 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+This shows that the Junit test cases have run successfully.

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/README
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/README
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/build.xml?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/build.xml (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/build.xml Mon Jul  2 08:54:59 2007
@@ -0,0 +1,72 @@
+<!--
+ * 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.    
+-->
+<project name="simple-callback-ws" default="compile">
+    <property name="test.class" value="simplecallback.SimpleCallbackClient" />
+	<property name="test.jar"   value="sample-simple-callback-ws.jar" />
+	
+    <target name="init">
+        <mkdir dir="target/classes"/>
+    </target>
+	
+    <target name="compile" depends="init">
+        <javac srcdir="src/main/java"
+               destdir="target/classes"
+               debug="on"
+               source="1.5"
+               target="1.5">
+            <classpath>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </javac> 
+        <copy todir="target/classes">
+            <fileset dir="src/main/resources"/>
+        </copy>
+        <jar destfile="target/${test.jar}" basedir="target/classes">
+            <manifest>
+                <attribute name="Main-Class" value="${test.class}" /> 
+            </manifest>
+        </jar>    	
+    </target>	
+	
+    <target name="run-classes">
+        <java classname="${test.class}"
+              fork="true">
+            <classpath>
+                <pathelement path="target/classes"/>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </java>
+    </target>
+	
+    <target name="run">
+        <java classname="${test.class}"
+              fork="true">
+            <classpath>
+                <pathelement path="target/${test.jar}"/>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </java>    	
+    </target>
+	
+    <target name="clean">
+        <delete quiet="true" includeemptydirs="true">
+            <fileset dir="target"/>
+        </delete>
+    </target>
+</project>

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/build.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/pom.xml?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/pom.xml (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/pom.xml Mon Jul  2 08:54:59 2007
@@ -0,0 +1,79 @@
+<?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.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-sca</artifactId>
+        <version>0.90-incubating</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>sample-simple-callback-ws</artifactId>
+    <name>Apache Tuscany Simple Callback Web Services Sample</name>
+
+    <repositories>
+       <repository>
+          <id>apache.incubator</id>
+          <url>http://people.apache.org/repo/m2-incubating-repository</url>
+       </repository>
+    </repositories>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>0.90-incubating</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>0.90-incubating</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>0.90-incubating</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-http-tomcat</artifactId>
+            <version>0.90-incubating</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+       <finalName>${artifactId}</finalName>
+    </build>
+
+</project>

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/simple-callback-ws.png
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/simple-callback-ws.png?view=auto&rev=552520
==============================================================================
Binary file - no diff available.

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/simple-callback-ws.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/simple-callback-ws.svg
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/simple-callback-ws.svg?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/simple-callback-ws.svg (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/simple-callback-ws.svg Mon Jul  2 08:54:59 2007
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ * 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.
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="1052.3622"
+   height="744.09448"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.44"
+   sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-head\sca\samples\simple-callback"
+   sodipodi:docname="simple-callback.svg"
+   version="1.0">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.4"
+     inkscape:cx="375"
+     inkscape:cy="414.63224"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     inkscape:window-width="1054"
+     inkscape:window-height="721"
+     inkscape:window-x="74"
+     inkscape:window-y="306" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <g
+       id="g2997">
+      <rect
+         rx="15.307091"
+         ry="12.692303"
+         y="192.00233"
+         x="258.31146"
+         height="299.99988"
+         width="495.71429"
+         id="rect2067"
+         style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.99999964;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+      <flowRoot
+         id="flowRoot2954"
+         xml:space="preserve"><flowRegion
+           id="flowRegion2956"><rect
+             y="212.66591"
+             x="281.42856"
+             height="61.42857"
+             width="170"
+             id="rect2958" /></flowRegion><flowPara
+           id="flowPara2960">simplecallback</flowPara></flowRoot>      <rect
+         style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         id="rect1883"
+         width="115.66247"
+         height="85.862968"
+         x="549.39777"
+         y="308.7417"
+         rx="6.9961648"
+         ry="7.1230249" />
+      <flowRoot
+         xml:space="preserve"
+         id="flowRoot1885"
+         transform="translate(281.807,102.8031)"><flowRegion
+           id="flowRegion1887"><rect
+             id="rect1889"
+             width="170"
+             height="61.42857"
+             x="281.42856"
+             y="212.66591" /></flowRegion><flowPara
+           id="flowPara1891">MyService</flowPara><flowPara
+           id="flowPara1915">Component</flowPara></flowRoot>      <path
+         style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="M 532.24723,340.58867 L 565.58227,340.58867 L 571.64318,353.72065 L 564.57212,365.84249 L 532.24723,365.84249 L 539.82338,353.72065 L 532.24723,340.58867 z "
+         id="path1895" />
+    </g>
+    <rect
+       style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect2988"
+       width="115.66247"
+       height="85.862968"
+       x="339.91632"
+       y="310.73904"
+       rx="6.9961648"
+       ry="7.1230249" />
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot2966"
+       transform="translate(72.32554,104.8005)"><flowRegion
+         id="flowRegion2968"><rect
+           id="rect2970"
+           width="170"
+           height="61.42857"
+           x="281.42856"
+           y="212.66591" /></flowRegion><flowPara
+         id="flowPara2972">MyClient</flowPara><flowPara
+         id="flowPara1913">Component</flowPara></flowRoot>    <path
+       style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 436.01825,340.74775 L 469.35329,340.74775 L 475.4142,353.87973 L 468.34314,366.00157 L 436.01825,366.00157 L 443.5944,353.87973 L 436.01825,340.74775 z "
+       id="path3019" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 474.28571,353.3802 L 539.28571,354.09448"
+       id="path1917"
+       inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-head\sca\samples\simple-callback\simple-callback.png"
+       inkscape:export-xdpi="52.84"
+       inkscape:export-ydpi="52.84" />
+  </g>
+</svg>

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java Mon Jul  2 08:54:59 2007
@@ -0,0 +1,27 @@
+/*
+ * 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.    
+ */
+package simplecallback;
+
+/**
+ * The client interface
+ */
+public interface MyClient {
+
+    void aClientMethod();
+}

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java Mon Jul  2 08:54:59 2007
@@ -0,0 +1,51 @@
+/*
+ * 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.    
+ */
+package simplecallback;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * Demonstrates a component-to-component callback invocation
+ */
+@Service(MyClient.class)
+@Scope("COMPOSITE")
+public class MyClientImpl implements MyClient, MyServiceCallback {
+
+    private MyService myService;
+    static String result;
+
+    @Reference
+    public void setMyService(MyService myService) {
+        this.myService = myService;
+    }
+
+    public void aClientMethod() {
+        System.out.println("aClientMethod on thread " + Thread.currentThread());
+        myService.someMethod(" -> someMethod ");
+        System.out.println("aClientMethod return from someMethod on thread " + Thread.currentThread());
+    }
+
+    public void receiveResult(String result) {
+        System.out.println("receiveResult on thread " + Thread.currentThread());
+        System.out.println("Result: " + result);
+        MyClientImpl.result = result;
+    }
+}

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java Mon Jul  2 08:54:59 2007
@@ -0,0 +1,34 @@
+/*
+ * 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.    
+ */
+package simplecallback;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.OneWay;
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * This service that will be invoked in a non-blocking fashion
+ */
+@Remotable
+@Callback(MyServiceCallback.class)
+public interface MyService {
+
+    @OneWay
+    void someMethod(String arg);
+}

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java Mon Jul  2 08:54:59 2007
@@ -0,0 +1,31 @@
+/*
+ * 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.    
+ */
+package simplecallback;
+
+import org.osoa.sca.annotations.OneWay;
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The callback interface for {@link MyService}.
+ */
+@Remotable
+public interface MyServiceCallback {
+
+    void receiveResult(String result);
+}

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java Mon Jul  2 08:54:59 2007
@@ -0,0 +1,54 @@
+/*
+ * 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.    
+ */
+package simplecallback;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements MyService and uses a callback.
+ */
+@Service(MyService.class)
+@Scope("COMPOSITE")
+public class MyServiceImpl implements MyService {
+
+    private MyServiceCallback myServiceCallback;
+
+    /**
+     * The setter used by the runtime to set the callback reference 
+     * @param myServiceCallback
+     */
+    @Callback
+    public void setMyServiceCallback(MyServiceCallback myServiceCallback) {
+        System.out.println("setMyServiceCallback on thread " + Thread.currentThread());
+        this.myServiceCallback = myServiceCallback;
+    }
+    
+    public void someMethod(String arg) {
+        System.out.println("someMethod on thread " + Thread.currentThread());
+        // invoke the callback
+        try {
+            myServiceCallback.receiveResult(arg + " -> receiveResult ");
+        } catch(RuntimeException e) {
+            System.out.println("RuntimeException invoking receiveResult: " + e.toString());
+            e.printStackTrace();
+        }
+    }
+}

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java Mon Jul  2 08:54:59 2007
@@ -0,0 +1,38 @@
+/*
+ * 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.    
+ */
+package simplecallback;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * Demonstrates resolving the client service and initiating the callback sequence
+ */
+public class SimpleCallbackClient {
+
+    public static void main(String[] args) throws Exception {
+        SCADomain scaDomain = SCADomain.newInstance("simplecallback.composite");
+        MyClient myClient = scaDomain.getService(MyClient.class, "MyClientComponent");
+        
+        System.out.println("Main thread " + Thread.currentThread());
+        myClient.aClientMethod();
+        Thread.sleep(500);
+        
+        scaDomain.close();
+    }
+}

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/simplecallback.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/simplecallback.composite?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/simplecallback.composite (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/simplecallback.composite Mon Jul  2 08:54:59 2007
@@ -0,0 +1,49 @@
+<?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.    
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	targetNamespace="http://simplecallback"
+	xmlns:cb="http://simplecallback"
+	name="simplecallback">
+
+    <component name="MyClientComponent">
+        <reference name="myService">
+            <interface.java interface="simplecallback.MyService"
+                callbackInterface="simplecallback.MyServiceCallback" />
+            <binding.ws wsdlElement="http://simplecallback#wsdl.port(MyServiceSoapService/MyServiceSoapPort)" />
+            <callback>
+                <binding.ws wsdlElement="http://simplecallback#wsdl.binding(MyServiceCallbackSoapBinding)" />
+            </callback>
+        </reference>
+        <implementation.java class="simplecallback.MyClientImpl" />
+    </component>
+
+    <component name="MyServiceComponent">
+        <service name="MyService">
+            <interface.wsdl interface="http://simplecallback#wsdl.interface(MyService)"
+                callbackInterface="http://simplecallback#wsdl.interface(MyServiceCallback)" />
+            <binding.ws wsdlElement="http://simplecallback#wsdl.port(MyServiceSoapService/MyServiceSoapPort)" />
+            <callback>
+                <binding.ws wsdlElement="http://simplecallback#wsdl.binding(MyServiceCallbackSoapBinding)" />
+            </callback>
+        </service>
+        <implementation.java class="simplecallback.MyServiceImpl" />
+    </component>
+    
+</composite>

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl Mon Jul  2 08:54:59 2007
@@ -0,0 +1,115 @@
+<?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.    
+-->
+<wsdl:definitions targetNamespace="http://simplecallback" xmlns:tns="http://simplecallback" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    name="simplecallback">
+
+    <wsdl:types>
+        <schema elementFormDefault="qualified" targetNamespace="http://simplecallback" xmlns="http://www.w3.org/2001/XMLSchema">
+
+            <element name="someMethod">
+                <complexType>
+                    <sequence>
+                        <element name="name" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="someMethodResponse">
+                <complexType/>
+            </element>
+
+            <element name="receiveResult">
+                <complexType>
+                    <sequence>
+                        <element name="name" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="receiveResultResponse">
+                <complexType/>
+            </element>
+
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="someMethodRequest">
+        <wsdl:part element="tns:someMethod" name="parameters"/>
+    </wsdl:message>
+
+    <wsdl:message name="someMethodResponse">
+        <wsdl:part element="tns:someMethodResponse" name="parameters"/>
+    </wsdl:message>
+
+    <wsdl:message name="receiveResultRequest">
+        <wsdl:part element="tns:receiveResult" name="parameters"/>
+    </wsdl:message>
+
+    <wsdl:message name="receiveResultResponse">
+        <wsdl:part element="tns:receiveResultResponse" name="parameters"/>
+    </wsdl:message>
+
+    <wsdl:portType name="MyService">
+        <wsdl:operation name="someMethod">
+            <wsdl:input message="tns:someMethodRequest" name="someMethodRequest"/>
+            <wsdl:output message="tns:someMethodResponse" name="someMethodResponse"/>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:portType name="MyServiceCallback">
+        <wsdl:operation name="receiveResult">
+            <wsdl:input message="tns:receiveResultRequest" name="receiveResultRequest"/>
+            <wsdl:output message="tns:receiveResultResponse" name="receiveResultResponse"/>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="MyServiceSoapBinding" type="tns:MyService">
+        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="someMethod">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="someMethodRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="someMethodResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:binding name="MyServiceCallbackSoapBinding" type="tns:MyServiceCallback">
+        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="receiveResult">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="receiveResultRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="receiveResultResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="MyServiceSoapService">
+        <wsdl:port binding="tns:MyServiceSoapBinding" name="MyServiceSoapPort">
+            <wsdlsoap:address location="http://localhost:8080/MyServiceComponent"/>
+        </wsdl:port>
+    </wsdl:service>
+
+</wsdl:definitions>

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java?view=auto&rev=552520
==============================================================================
--- incubator/tuscany/java/sca/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java (added)
+++ incubator/tuscany/java/sca/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java Mon Jul  2 08:54:59 2007
@@ -0,0 +1,50 @@
+/*
+ * 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.    
+ */
+package simplecallback;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * A testcase that demonstrates resolving the client service and initiating the callback sequence
+ */
+public class SimpleCallbackTestCase extends TestCase {
+
+    private SCADomain scaDomain;
+    private MyClient myClient;
+
+    protected void setUp() throws Exception {
+        scaDomain = SCADomain.newInstance("simplecallback.composite");
+        myClient = scaDomain.getService(MyClient.class, "MyClientComponent");
+    }
+    
+    protected void tearDown() throws Exception {
+        scaDomain.close();
+    }
+
+    public void test() throws Exception {
+        System.out.println("Main thread " + Thread.currentThread());
+        myClient.aClientMethod();
+        System.out.println("Sleeping ...");
+        Thread.sleep(300);
+        assertEquals("-> someMethod -> receiveResult", MyClientImpl.result);
+    }
+}
+

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message