You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sv...@apache.org on 2007/07/18 09:23:36 UTC
svn commit: r557182 - in
/incubator/tuscany/java/sca/samples/helloworld-ws-reference/src:
main/resources/helloworldwsclient.composite
test/java/helloworld/HelloWorldClientTestCase.java
Author: svkrish
Date: Wed Jul 18 00:23:35 2007
New Revision: 557182
URL: http://svn.apache.org/viewvc?view=rev&rev=557182
Log:
extended the sample to demonstrate that issue reported http://issues.apache.org/jira/browse/TUSCANY-1342 is fixed
Modified:
incubator/tuscany/java/sca/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite
incubator/tuscany/java/sca/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java
Modified: incubator/tuscany/java/sca/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite?view=diff&rev=557182&r1=557181&r2=557182
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite (original)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite Wed Jul 18 00:23:35 2007
@@ -22,10 +22,21 @@
xmlns:hw="http://helloworld"
name="helloworldwsclient">
+ <!-- A component with an embedded reference definition connecting to an external webservice
+ The wsdl interface for the reference is derived from the information specified by the 'wsdlElement'
+ -->
+ <component name="HelloTuscanyServiceComponent">
+ <implementation.java class="helloworld.HelloWorldServiceComponent"/>
+ <reference name="helloWorldService">
+ <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
+ </reference>
+ </component>
+
+ <!-- A component with a reference promoted as a composite reference -->
<component name="HelloWorldServiceComponent">
<implementation.java class="helloworld.HelloWorldServiceComponent"/>
</component>
-
+
<reference name="HelloWorldService" promote="HelloWorldServiceComponent/helloWorldService">
<interface.java interface="helloworld.HelloWorldService" />
<binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
Modified: incubator/tuscany/java/sca/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java?view=diff&rev=557182&r1=557181&r2=557182
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java (original)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java Wed Jul 18 00:23:35 2007
@@ -33,6 +33,7 @@
public class HelloWorldClientTestCase {
private HelloWorldService helloWorldService;
+ private HelloWorldService helloTuscanyService;
private SCADomain scaDomain;
private SCATestCaseRunner server;
@@ -42,6 +43,7 @@
try {
scaDomain = SCADomain.newInstance("helloworldwsclient.composite");
helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent");
+ helloTuscanyService = scaDomain.getService(HelloWorldService.class, "HelloTuscanyServiceComponent");
server = new SCATestCaseRunner(HelloWorldServerTest.class);
server.before();
@@ -55,6 +57,12 @@
public void testWSClient() throws Exception {
String msg = helloWorldService.getGreetings("Smith");
Assert.assertEquals("Hello Smith", msg);
+ }
+
+ @Test
+ public void testEmbeddedReferenceClient() throws Exception {
+ String msg = helloTuscanyService.getGreetings("Tuscany");
+ Assert.assertEquals("Hello Tuscany", msg);
}
@After
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org