You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2011/06/29 15:47:22 UTC

svn commit: r1141102 - in /tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/sca/ src/main/java/org/apa...

Author: slaws
Date: Wed Jun 29 13:47:21 2011
New Revision: 1141102

URL: http://svn.apache.org/viewvc?rev=1141102&view=rev
Log:
Add itest for testing WS Policy as applied to the WS binding. Not in build yet. 

Added:
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/   (with props)
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/README
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/pom.xml
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/ServerPWCBHandler.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/sca-contribution.xml
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/services/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/helloworldKeys.jks   (with props)
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/apache/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/ws/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java

Propchange: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jun 29 13:47:21 2011
@@ -0,0 +1,4 @@
+.classpath
+.project
+.settings
+target

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/README
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/README?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/README (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/README Wed Jun 29 13:47:21 2011
@@ -0,0 +1,116 @@
+No Security
+===========
+
+POST /HelloWorldService/HelloWorld HTTP/1.1
+Content-Type: text/xml; charset=UTF-8
+SOAPAction: ""
+User-Agent: Axis2
+Host: localhost:8081
+Content-Length: 287
+
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+  <soapenv:Body>
+    <ns2:getGreetings xmlns:ns2="http://helloworld.axis2.ws.binding.sca.tuscany.apache.org/">
+      <arg0>fred</arg0>
+    </ns2:getGreetings>
+  </soapenv:Body>
+</soapenv:Envelope>
+
+HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Transfer-Encoding: chunked
+
+146
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+  <soapenv:Body>
+    <ns2:getGreetingsResponse xmlns:ns2="http://helloworld.axis2.ws.binding.sca.tuscany.apache.org/">
+      <return>Hello fred null subject</return>
+    </ns2:getGreetingsResponse>
+  </soapenv:Body>
+</soapenv:Envelope>
+
+Integrity
+=========
+
+POST /HelloWorldService/HelloWorld HTTP/1.1
+Content-Type: text/xml; charset=UTF-8
+SOAPAction: ""
+User-Agent: Axis2
+Host: localhost:8081
+Content-Length: 3714
+
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+    <soape nv:Header>
+        <wsse:Security
+            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+            soapenv:mustUnderstand="1">
+            <wsu:Timestamp
+                xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+                wsu:Id="Timestamp-1">
+                <wsu:Created>2011-06-29T13:19:32.343Z</wsu:Created>
+                <wsu:Expires>2011-06-29T13:24:32.343Z</wsu:Expires>
+            </wsu:Timestamp>
+            <wsse:BinarySecurityToken
+                xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+                EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
+                ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
+                wsu:Id="CertId-3FC5F405BC1C8FD92213093535726401">
+                MIICPTCCAaagAwIBAgIESZNUvDANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVSz
+                ELMAkGA1UECBMCVUsxEzARBgNVBAcTCldpbmNoZXN0ZXIxDzANBgNVBAoTBkFwYWNoZTEPMA0GA1UECxMGQXBhY2hlMRAwDgYDVQQDEwdUdXNjYW55MB4XDT
+                A5MDIxMTIyNDQxMloXDTM2MDYyODIyNDQxMlowYzELMAkGA1UEBhMCVUsxCzAJBgNVBAgTAlVLMRMwEQYDVQQHEwpXaW5jaGVzdGVyMQ8wDQYDVQQKEwZBcG
+                FjaGUxDzANBgNVBAsTBkFwYWNoZTEQMA4GA1UEAxMHVHVzY2FueTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAm9V5SuYbkyZreLyHuEaorRya3fEkpF
+                q2n3Sg9kaQH5L0Zb81MNEUkoNk4jeFDC7GnQ4QQU9UfM/xAX3d0VIZSFdp7I5lxVRnXg5tcacDmckuJRCAO0AkeI4aRTD/iHQ2RfcJCwZtXJPdo2OywBGIf4
+                CQnZI5mkNDAbK2SEaN+/cCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAX593t0K195ZQc3g2+mIhjuwh5tKktaKS6x0AEmaTxI1c3F8LY6bK89DiQ1gEf36ryfA
+                CGgHrRyufgcQtlIHEbbppPiPHgaBW4pQjJqyMa9/TlU+OqhBcc7dyGZd9MU0ZNwJPXW4vmSFLKp95bjmfxXNPm7Oln1StAD3BLo5YsYA==
+            </wsse:BinarySecurityToken>
+                <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-2">
+                    <ds:SignedInfo>
+                        <ds:CanonicalizationMethod
+                            Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
+                        <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
+                        <ds:Reference URI="#Id-28141700">
+                            <ds:Transforms>
+                                <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
+                            </ds:Transforms>
+                            <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
+                            <ds:DigestValue>cUwRlwItvnyGcmaDX9hBhoVYgUA=</ds:DigestValue>
+                        </ds:Reference>
+                        <ds:Reference URI="#Timestamp-1">
+                            <ds:Transforms>
+                                <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
+                            </ds:Transforms>
+                            <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
+                            <ds:DigestValue>AR60PsgLRdjhQjx3Kn5myNfcx4g=</ds:DigestValue>
+                        </ds:Reference>
+                    </ds:SignedInfo>
+                    <ds:SignatureValue>
+                        jvDnLfKdyxnDCVtmJr0lrwQsigBBlZhYMyYJeQswjit1th4fxatyywV4wRxu/rm3iuNl+svnS9HA
+                        Vyv1Enr2/5+2QFTAeKKcGa/HtpSL/dtZr8UTHwFVR9/ecDpAxupb2k2vumpxH2WQlvnrj1lVQjE4
+                        ewLiWB6NEjdhnbYL9Ws=
+                    </ds:SignatureValue>
+                    <ds:KeyInfo Id="KeyId-3FC5F405BC1C8FD92213093535726562">
+                        <wsse:SecurityTokenReference
+                            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+                            wsu:Id="STRId-3FC5F405BC1C8FD92213093535726563">
+                            <wsse:Reference URI="#CertId-3FC5F405BC1C8FD92213093535726401"
+                                Value
+                                Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" />
+                        </wsse:SecurityTokenReference>
+                    </ds:KeyInfo>
+                </ds:Signature>
+        </wsse:Security>
+    </soapenv:Header>
+        <soapenv:Body
+            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+            wsu:Id="Id-28141700">
+            <_ns_:getGreetings xmlns:_ns_="http://helloworld">
+                <ns3:name xm lns:ns3="http://helloworld"
+                    xmlns:ns2="http://helloworld.axis2.ws.binding.sca.tuscany.apache.org/"
+                    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                    xsi:type="xs:string">fred</ns3:name>
+            </_ns_:getGreetings>
+        </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/pom.xml?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/pom.xml (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/pom.xml Wed Jun 29 13:47:21 2011
@@ -0,0 +1,63 @@
+<?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>itest-ws</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>itest-ws-wspolicy</artifactId>
+    <name>Apache Tuscany SCA iTest WS with WSPolicy</name>
+
+    <dependencies>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-base-runtime-pom</artifactId>
+            <type>pom</type>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+
+       <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+            <version>2.0-SNAPSHOT</version>
+       </dependency>
+                
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+            <version>6.1.19</version>
+        </dependency>
+
+        <dependency>
+           <groupId>org.codehaus.woodstox</groupId>
+           <artifactId>wstx-asl</artifactId>
+           <version>3.2.9</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+       <finalName>${project.artifactId}</finalName>
+    </build>
+</project>

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java Wed Jun 29 13:47:21 2011
@@ -0,0 +1,29 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.ws.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+    
+    String getGreetings(String s);
+
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java Wed Jun 29 13:47:21 2011
@@ -0,0 +1,35 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.ws.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClient implements HelloWorld {
+
+    @Reference
+    public HelloWorld helloWorldWS;
+    
+    public String getGreetings(String s) {
+        String response = helloWorldWS.getGreetings(s);
+        System.out.println("At client: " + response);
+        return response;
+    }
+
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java Wed Jun 29 13:47:21 2011
@@ -0,0 +1,45 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.ws.axis2.helloworld;
+
+import javax.security.auth.Subject;
+
+import org.oasisopen.sca.RequestContext;
+import org.oasisopen.sca.annotation.Context;
+
+public class HelloWorldService implements HelloWorld {
+
+    @Context
+    protected RequestContext requestContext;
+    
+    public String getGreetings(String name) {
+        Subject subject = requestContext.getSecuritySubject();
+        String response = "Hello " + name + " ";
+        
+        if (subject == null){
+            response += "null subject";
+        } else {
+            response += subject.getPrincipals().iterator().next().getName();
+        }
+        
+        System.out.println("At service: " + response);
+        return response;
+    }
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/ServerPWCBHandler.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/ServerPWCBHandler.java?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/ServerPWCBHandler.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/ServerPWCBHandler.java Wed Jun 29 13:47:21 2011
@@ -0,0 +1,55 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.ws.axis2.helloworld;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class 
+ */
+public class ServerPWCBHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+    	for (int i = 0; i < callbacks.length; i++) {
+            System.out.println("*** Calling Server User/Passwd Handler....");
+            WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+            System.out.println("User Id = " + pwcb.getIdentifer());
+            System.out.println("Password = " + pwcb.getPassword());
+            
+            if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN ) {
+                if ( pwcb.getIdentifer().equals("TuscanyWsUser") &&
+                        pwcb.getPassword().equals("TuscanyWsUserPasswd") ){
+                            return;
+                } else {
+                    throw new UnsupportedCallbackException(pwcb, "Authentication Failed : UserId - Password mismatch");
+                }
+            } else if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) {
+                pwcb.setPassword("TuscanyWsUserPasswd");
+            }
+        }
+    }
+
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/sca-contribution.xml?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/sca-contribution.xml (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/sca-contribution.xml Wed Jun 29 13:47:21 2011
@@ -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://docs.oasis-open.org/ns/opencsa/sca/200912"
+              xmlns:itest="http://www.tuscany.apache.org/itests/binding/ws/axis2">
+   <deployable composite="itest:HelloWorld"/>
+</contribution>
\ No newline at end of file

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions Wed Jun 29 13:47:21 2011
@@ -0,0 +1,17 @@
+# 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.
+org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
\ No newline at end of file

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/helloworldKeys.jks
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/helloworldKeys.jks?rev=1141102&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/helloworldKeys.jks
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml Wed Jun 29 13:47:21 2011
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+    * 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.    
+-->
+<definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
+             targetNamespace="http://www.tuscany.apache.org/itests/binding/ws/axis2"
+    		 xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
+    		 xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+             xmlns:itest="http://www.tuscany.apache.org/itests/binding/ws/axis2" >
+
+
+    <sca:policySet name="WSPolicyIntegrityPolicySet"
+                   attachTo="//sca:binding.ws"
+                   provides="integrity"
+                   appliesTo="//sca:binding.ws">
+	    <wsp:Policy wsu:Id="SignOnly" 
+	        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
+	        xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+	        <wsp:ExactlyOne>
+	            <wsp:All>
+	                <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+	                    <wsp:Policy>
+	                        <sp:InitiatorToken>
+	                            <wsp:Policy>
+	                                <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+	                                    <wsp:Policy>
+	                                        <sp:WssX509V3Token10/>
+	                                    </wsp:Policy>
+	                                </sp:X509Token>
+	                            </wsp:Policy>
+	                        </sp:InitiatorToken>
+	                        <sp:RecipientToken>
+	                            <wsp:Policy>
+	                                <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+	                                    <wsp:Policy>
+	                                        <sp:WssX509V3Token10/>
+	                                    </wsp:Policy>
+	                                </sp:X509Token>
+	                            </wsp:Policy>
+	                        </sp:RecipientToken>
+	                        <sp:AlgorithmSuite>
+	                            <wsp:Policy>
+	                                <sp:TripleDesRsa15/>
+	                            </wsp:Policy>
+	                        </sp:AlgorithmSuite>
+	                        <sp:Layout>
+	                            <wsp:Policy>
+	                                <sp:Strict/>
+	                            </wsp:Policy>
+	                        </sp:Layout>
+	                        <sp:IncludeTimestamp/>
+	                        <sp:OnlySignEntireHeadersAndBody/>
+	                    </wsp:Policy>
+	                </sp:AsymmetricBinding>
+	                
+	                <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+	                    <wsp:Policy>
+	                        <sp:MustSupportRefKeyIdentifier/>
+	                        <sp:MustSupportRefIssuerSerial/>
+	                    </wsp:Policy>
+	                </sp:Wss10>
+	                
+	                <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+	                    <sp:Body/>
+	                </sp:SignedParts>
+	    
+	                <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy"> 
+	                    <ramp:user>TuscanyWsUser</ramp:user>
+	                    <ramp:encryptionUser>TuscanyWsUser</ramp:encryptionUser>	                    
+	                    <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.helloworld.ServerPWCBHandler</ramp:passwordCallbackClass>
+	                    
+	                    <ramp:signatureCrypto>
+	                        <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+	                            <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+	                            <ramp:property name="org.apache.ws.security.crypto.merlin.file">helloworldKeys.jks</ramp:property>
+	                            <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property>
+	                        </ramp:crypto>
+	                    </ramp:signatureCrypto>
+	                </ramp:RampartConfig>
+	    
+	            </wsp:All>
+	        </wsp:ExactlyOne>
+	    </wsp:Policy>
+    </sca:policySet>
+        
+      
+</definitions>
\ No newline at end of file

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite Wed Jun 29 13:47:21 2011
@@ -0,0 +1,46 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200912"
+		   xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+		   targetNamespace="http://www.tuscany.apache.org/itests/binding/ws/axis2"
+           name="HelloWorld">
+
+    <component name="HelloWorldClient">
+        <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldClient"/>
+<!--        
+        <reference name="helloWorldWS" target="HelloWorldService/HelloWorld"/>
+-->
+        <reference name="helloWorldWS" requires="integrity">
+            <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+            <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)"
+                        uri="http://localhost:8081/HelloWorldService/HelloWorld"/>
+        </reference>    
+    </component>
+    
+    <component name="HelloWorldService">
+        <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldService"/>
+        <service name="HelloWorld" requires="integrity">
+            <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+            <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)"
+                        uri="http://localhost:8080/HelloWorldService/HelloWorld"/>
+        </service>		
+    </component>
+    
+</composite>

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl Wed Jun 29 13:47:21 2011
@@ -0,0 +1,90 @@
+<?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://helloworld" 
+                  xmlns:tns="http://helloworld" 
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+                  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
+                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	              name="helloworld">
+
+    <wsdl:types>
+        <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+            <element name="getGreetings">
+                <complexType>
+                    <sequence>
+                        <element name="name" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="getGreetingsResponse">
+                <complexType>
+                    <sequence>
+                        <element name="getGreetingsReturn" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="getGreetingsRequest">
+        <wsdl:part element="tns:getGreetings" name="parameters"/>
+    </wsdl:message>
+
+    <wsdl:message name="getGreetingsResponse">
+        <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+    </wsdl:message>
+
+    <wsdl:portType name="HelloWorld">
+        <wsdl:operation name="getGreetings">
+            <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+            <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="getGreetings">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="getGreetingsRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="getGreetingsResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+
+    </wsdl:binding>
+
+    <wsdl:service name="HelloWorldService">
+        <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort1">
+            <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService1"/>
+        </wsdl:port>
+        <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+            <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+        </wsdl:port>
+        <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+            <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+        </wsdl:port>
+    </wsdl:service>
+
+</wsdl:definitions>

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java?rev=1141102&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java Wed Jun 29 13:47:21 2011
@@ -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 org.apache.tuscany.sca.binding.ws.axis2;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorld;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class HelloworldTestCase extends TestCase {
+
+    private Node node;
+    private HelloWorld helloWorld;
+
+    public void testCalculator() throws Exception {
+        assertEquals("Hello fred myname", helloWorld.getGreetings("fred"));
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        node = NodeFactory.newInstance().createNode(new Contribution("test", "target/classes"));
+        node.start();
+        helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
+    }
+    
+    @Override
+    protected void tearDown() throws Exception {
+        node.stop();
+    }
+
+}