summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/tags/1.5.1-RC3/itest/policy
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/pom.xml114
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldClientImpl.java40
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldService.java30
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldServiceImpl.java46
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/resources/definitions.xml44
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/resources/helloworld.composite46
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/test/java/org/apache/tuscany/sca/itest/BasicAuthTestCase.java114
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/pom.xml74
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/java/helloworld/HelloWorldImpl.java51
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/java/helloworld/HelloWorldService.java38
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/resources/definitions.xml29
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/resources/helloworld.composite33
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/test/java/org/apache/tuscany/sca/itest/PolicySecurityJSR250TestCase.java54
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/pom.xml113
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldClientImpl.java41
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldService.java30
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldServiceImpl.java54
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/definitions.xml49
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/helloworld.composite56
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/jndi.properties39
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/test/java/org/apache/tuscany/sca/itest/TokenAuthTestCase.java117
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/pom.xml67
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/java/helloworld/HelloWorldImpl.java33
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/java/helloworld/HelloWorldService.java30
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/resources/definitions.xml33
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/resources/helloworld.composite34
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/test/java/org/apache/tuscany/sca/itest/PolicyIdentityTestCase.java54
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/pom.xml68
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/AddService.java34
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/AddServiceImpl.java35
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorClient.java69
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorService.java35
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorServiceImpl.java76
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/DivideService.java33
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/DivideServiceImpl.java35
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/MultiplyService.java28
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/MultiplyServiceImpl.java35
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/PolicyQNames.java43
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/SubtractService.java28
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/SubtractServiceImpl.java35
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestImplPolicyHandler.java84
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestRefPolicyHandler.java61
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestSvcPolicyHandler.java61
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/Calculator.composite66
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor19
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler28
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/definitions.xml147
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/PoliciedCalculatorTestCase.java55
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/Policy.java33
-rw-r--r--sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java82
50 files changed, 0 insertions, 2653 deletions
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/pom.xml
deleted file mode 100644
index 7366fcf066..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/pom.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?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-itest</artifactId>
- <version>1.5.1</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-policy-security-basicauth</artifactId>
- <name>Apache Tuscany SCA iTest Policy Security Basic Authentication</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-api</artifactId>
- <version>1.5.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2-policy</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-runtime</artifactId>
- <version>1.5.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>httpunit</groupId>
- <artifactId>httpunit</artifactId>
- <version>1.6.1</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-</project>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldClientImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldClientImpl.java
deleted file mode 100644
index 7345af7f7c..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldClientImpl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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 helloworld;
-
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldClientImpl implements HelloWorldService {
-
- @Reference
- protected HelloWorldService helloworldWS;
-
-
-
- public String getGreetings(String name) {
- return "Hello " +
- helloworldWS.getGreetings(name);
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldService.java
deleted file mode 100644
index 268d90e910..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldService.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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 helloworld;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldServiceImpl.java
deleted file mode 100644
index 6372570d1f..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/java/helloworld/HelloWorldServiceImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 helloworld;
-
-import javax.security.auth.Subject;
-
-import org.osoa.sca.RequestContext;
-import org.osoa.sca.annotations.Context;
-import org.osoa.sca.annotations.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- @Context
- protected RequestContext requestContext;
-
- public String getGreetings(String name) {
- Subject subject = requestContext.getSecuritySubject();
-
- if (subject == null){
- return "Hello " + name + " null subject";
- } else {
- return "Hello " + name + " " + subject.toString();
- }
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/resources/definitions.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/resources/definitions.xml
deleted file mode 100644
index dbdf0cd263..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/resources/definitions.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?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://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://itest/policy"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:ip="http://itest/policy" >
-
-
- <sca:policySet name="BasicAuthenticationPolicySet"
- provides="authentication"
- appliesTo="sca:binding.ws">
- <tuscany:basicAuthentication>
- <tuscany:userName>myname</tuscany:userName>
- <tuscany:password>mypassword</tuscany:password>
- </tuscany:basicAuthentication>
- </sca:policySet>
-
- <sca:policySet name="ImplementationIdentityPolicySet"
- provides="tuscany:identity"
- appliesTo="sca:implementation.java">
- <securityIdentity>
- <useCallerIdentity/>
- </securityIdentity>
- </sca:policySet>
-
-</definitions> \ No newline at end of file
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/resources/helloworld.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/resources/helloworld.composite
deleted file mode 100644
index f883629180..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/main/resources/helloworld.composite
+++ /dev/null
@@ -1,46 +0,0 @@
-<?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://itest/policy"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:ip="http://itest/policy"
- name="Helloworld">
-
- <component name="HelloWorldClientComponent">
- <implementation.java class="helloworld.HelloWorldClientImpl" />
- <service name="HelloWorldService">
- <interface.java interface="helloworld.HelloWorldService"/>
- <binding.sca/>
- </service>
- <reference name="helloworldWS" requires="authentication">
- <binding.ws uri="http://localhost:8085/HelloWorldServiceWSComponent"/>
- </reference>
- </component>
-
- <component name="HelloWorldServiceWSComponent">
- <implementation.java class="helloworld.HelloWorldServiceImpl" requires="tuscany:identity"/>
- <service name="HelloWorldService" requires="authentication">
- <interface.java interface="helloworld.HelloWorldService"/>
- <binding.ws uri="http://localhost:8085/HelloWorldServiceWSComponent"/>
- </service>
- </component>
-
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/test/java/org/apache/tuscany/sca/itest/BasicAuthTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/test/java/org/apache/tuscany/sca/itest/BasicAuthTestCase.java
deleted file mode 100644
index b6e0444d2d..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-basicauth/src/test/java/org/apache/tuscany/sca/itest/BasicAuthTestCase.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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.itest;
-
-import java.io.ByteArrayInputStream;
-
-import junit.framework.Assert;
-import helloworld.HelloWorldService;
-
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
-import org.apache.ws.security.util.Base64;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import com.meterware.httpunit.PostMethodWebRequest;
-import com.meterware.httpunit.WebConversation;
-import com.meterware.httpunit.WebRequest;
-import com.meterware.httpunit.WebResponse;
-
-public class BasicAuthTestCase {
- private static SCANode node;
- private static HelloWorldService service;
-
- @BeforeClass
- public static void init() throws Exception {
- try {
- SCANodeFactory factory = SCANodeFactory.newInstance();
- node = factory.createSCANodeFromClassLoader("helloworld.composite",
- BasicAuthTestCase.class.getClassLoader());
- node.start();
-
- service = ((SCAClient)node).getService(HelloWorldService.class, "HelloWorldClientComponent");
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
-
- @AfterClass
- public static void destroy() throws Exception {
- node.stop();
- }
-
- @Test
- //@Ignore
- public void testViaSCAClient() {
- String greetings = service.getGreetings("Simon");
- System.out.println(">>>" + greetings);
- }
-
- @Test
- @Ignore
- public void testWSViaNonSCAClient() {
-
- try {
- String token ="MyToken";
- String encToken = Base64.encode(token.getBytes());
-
- String response = callService("http://L3AW203:8085/HelloWorldServiceWSComponent",
- "<?xml version='1.0' encoding='UTF-8'?>" +
- "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
- "<soapenv:Header>" +
- "<ns2:Token xmlns:ns2=\"http://helloworld/\">" + encToken + "</ns2:Token>" +
- "</soapenv:Header>" +
- "<soapenv:Body>" +
- "<ns2:getGreetings xmlns:ns2=\"http://helloworld/\">" +
- "<arg0>Simon</arg0>" +
- "</ns2:getGreetings>" +
- "</soapenv:Body>" +
- "</soapenv:Envelope>" );
- System.out.println(">>>" + response);
- } catch(Exception ex) {
- System.out.println(ex.toString());
- }
- }
-
- @Test
- public void testJMSViaNonSCAClient() {
- // TODO
- }
-
- public String callService(String url, String requestString) throws Exception {
- System.out.println("Request = " + requestString);
- WebConversation wc = new WebConversation();
- wc.setAuthorization("Me", "MyPasswd");
- WebRequest request = new PostMethodWebRequest( url,
- new ByteArrayInputStream(requestString.getBytes("UTF-8")),"text/xml");
- request.setHeaderField("SOAPAction", "");
- WebResponse response = wc.getResource(request);
- System.out.println("Response= " + response.getText());
- Assert.assertEquals(200, response.getResponseCode());
- return response.getText();
- }
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/pom.xml
deleted file mode 100644
index 273cd2cd8f..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?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-itest</artifactId>
- <version>1.5.1</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-policy-security-jsr250</artifactId>
- <name>Apache Tuscany SCA iTest Policy Security JSR250</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.5.1</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-policy-security-jsr250</artifactId>
- <version>1.5.1</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/java/helloworld/HelloWorldImpl.java
deleted file mode 100644
index 3569410e7d..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/java/helloworld/HelloWorldImpl.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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 helloworld;
-
-import javax.annotation.security.DenyAll;
-import javax.annotation.security.PermitAll;
-import javax.annotation.security.RunAs;
-import javax.annotation.security.RolesAllowed;
-
-/**
- * This class implements the HelloWorld service.
- */
-@RunAs("Administrator")
-public class HelloWorldImpl implements HelloWorldService {
-
- public String getGreetings(String name) {
- return "Hello " + name;
- }
-
- @DenyAll()
- public String getGreetingsDenyAll(String name) {
- return "Hello " + name;
- }
-
- @PermitAll
- public String getGreetingsPermitAll(String name) {
- return "Hello " + name;
- }
-
- @RolesAllowed("Administrator")
- public String getGreetingsRolesAllowed(String name) {
- return "Hello " + name;
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/java/helloworld/HelloWorldService.java
deleted file mode 100644
index 3e752144a0..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/java/helloworld/HelloWorldService.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 helloworld;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
-
- public String getGreetingsRolesAllowed(String name);
-
- public String getGreetingsPermitAll(String name);
-
- public String getGreetingsDenyAll(String name);
-
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/resources/definitions.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/resources/definitions.xml
deleted file mode 100644
index 64b8a95d18..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/resources/definitions.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://itest/policy"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:ip="http://itest/policy" >
-
- <policySet name="allowed_users" appliesTo="sca:implementation.java">
- <permitAll/>
- </policySet>
-</definitions> \ No newline at end of file
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/resources/helloworld.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/resources/helloworld.composite
deleted file mode 100644
index 456ca450f1..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/main/resources/helloworld.composite
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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://itest/policy"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:ip="http://itest/policy"
- name="Helloworld">
-
- <component name="HelloWorldServiceComponent">
- <implementation.java class="helloworld.HelloWorldImpl" policySets="ip:allowed_users"/>
- <service name="HelloWorldService">
- <interface.java interface="helloworld.HelloWorldService"/>
- </service>
- </component>
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/test/java/org/apache/tuscany/sca/itest/PolicySecurityJSR250TestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/test/java/org/apache/tuscany/sca/itest/PolicySecurityJSR250TestCase.java
deleted file mode 100644
index da5f6409ba..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-jsr250/src/test/java/org/apache/tuscany/sca/itest/PolicySecurityJSR250TestCase.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.itest;
-
-import helloworld.HelloWorldService;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class PolicySecurityJSR250TestCase {
- private static SCADomain domain;
- private static HelloWorldService service;
-
- @Test
- public void testPolicies() {
- //TODO
- String greetings = service.getGreetings("Luciano");
- System.out.println(">>>" + greetings);
- }
-
- @BeforeClass
- public static void init() throws Exception {
- try {
- domain = SCADomain.newInstance("helloworld.composite");
- } catch (Exception e) {
- e.printStackTrace();
- }
- service = domain.getService(HelloWorldService.class, "HelloWorldServiceComponent");
- }
-
- @AfterClass
- public static void destroy() throws Exception {
- domain.close();
- }
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/pom.xml
deleted file mode 100644
index 4566d62d40..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/pom.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?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-itest</artifactId>
- <version>1.5.1</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-policy-security-token</artifactId>
- <name>Apache Tuscany SCA iTest Policy Security Token Authentication</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-api</artifactId>
- <version>1.5.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-impl</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-jms-asf</artifactId>
- <version>1.5.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-jms-policy</artifactId>
- <version>1.5.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
- <version>5.2.0</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>httpunit</groupId>
- <artifactId>httpunit</artifactId>
- <version>1.6.1</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-</project>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldClientImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldClientImpl.java
deleted file mode 100644
index 769be60538..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldClientImpl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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 helloworld;
-
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldClientImpl implements HelloWorldService {
-
- @Reference
- protected HelloWorldService helloworldWS;
-
- @Reference
- protected HelloWorldService helloworldJMS;
-
- public String getGreetings(String name) {
- return helloworldWS.getGreetings(name) +
- helloworldJMS.getGreetings(name);
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldService.java
deleted file mode 100644
index 268d90e910..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldService.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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 helloworld;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldServiceImpl.java
deleted file mode 100644
index 60c07f6f73..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/java/helloworld/HelloWorldServiceImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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 helloworld;
-
-import java.security.Principal;
-
-import javax.security.auth.Subject;
-
-import org.osoa.sca.RequestContext;
-import org.osoa.sca.annotations.Context;
-import org.osoa.sca.annotations.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldServiceImpl implements HelloWorldService {
-
- @Context
- protected RequestContext requestContext;
-
- public String getGreetings(String name) {
- Subject subject = requestContext.getSecuritySubject();
-
- if (subject == null){
- return "Hello " + name + " null subject";
- } else {
- String response = "Hello " + name + " ";
-
- for (Principal principal : subject.getPrincipals()){
- response += principal.getName();
- }
-
- return response + " ";
- }
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/definitions.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/definitions.xml
deleted file mode 100644
index f7bb9bc374..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/definitions.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?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://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://itest/policy"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:ip="http://itest/policy" >
-
-
- <sca:policySet name="Axis2TokenAuthenticationPolicySet"
- provides="authentication"
- appliesTo="sca:binding.ws">
-
- <tuscany:axis2TokenAuthentication xmlns:foo="http://tuscany.apache.org/foo" tokenName="foo:myname"/>
- </sca:policySet>
-
- <sca:policySet name="JMSTokenAuthenticationPolicySet"
- provides="authentication"
- appliesTo="sca:binding.jms">
-
- <tuscany:jmsTokenAuthentication xmlns:foo="http://tuscany.apache.org/foo" tokenName="foo:myname"/>
- </sca:policySet>
-
- <sca:policySet name="ImplementationIdentityPolicySet"
- provides="tuscany:identity"
- appliesTo="sca:implementation.java">
- <securityIdentity>
- <useCallerIdentity/>
- </securityIdentity>
- </sca:policySet>
-
-</definitions> \ No newline at end of file
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/helloworld.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/helloworld.composite
deleted file mode 100644
index 1db89fd502..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/helloworld.composite
+++ /dev/null
@@ -1,56 +0,0 @@
-<?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://itest/policy"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:ip="http://itest/policy"
- name="Helloworld">
-
- <component name="HelloWorldClientComponent">
- <implementation.java class="helloworld.HelloWorldClientImpl"/>
- <service name="HelloWorldService">
- <interface.java interface="helloworld.HelloWorldService"/>
- <binding.sca/>
- </service>
- <reference name="helloworldWS" requires="authentication">
- <binding.ws uri="http://localhost:8085/HelloWorldServiceWSComponent"/>
- </reference>
- <reference name="helloworldJMS" requires="authentication">
- <binding.jms uri="jms:HelloWorldService"/>
- </reference>
- </component>
-
- <component name="HelloWorldServiceWSComponent">
- <implementation.java class="helloworld.HelloWorldServiceImpl" requires="tuscany:identity"/>
- <service name="HelloWorldService" requires="authentication">
- <interface.java interface="helloworld.HelloWorldService"/>
- <binding.ws uri="http://localhost:8085/HelloWorldServiceWSComponent"/>
- </service>
- </component>
-
- <component name="HelloWorldServiceJMSComponent">
- <implementation.java class="helloworld.HelloWorldServiceImpl" requires="tuscany:identity"/>
- <service name="HelloWorldService" requires="authentication">
- <interface.java interface="helloworld.HelloWorldService"/>
- <binding.jms/>
- </service>
- </component>
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/jndi.properties b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/jndi.properties
deleted file mode 100644
index 9abdff215d..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost?broker.persistent=false
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as.
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-connectionFactoryNames = ConnectionFactory
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.RequestQueue = RequestQueue
-queue.ResponseQueue = ResponseQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-#topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/test/java/org/apache/tuscany/sca/itest/TokenAuthTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/test/java/org/apache/tuscany/sca/itest/TokenAuthTestCase.java
deleted file mode 100644
index b0ae00b639..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security-token/src/test/java/org/apache/tuscany/sca/itest/TokenAuthTestCase.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * 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.itest;
-
-import java.io.ByteArrayInputStream;
-
-import junit.framework.Assert;
-import helloworld.HelloWorldService;
-
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
-import org.apache.ws.security.util.Base64;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import com.meterware.httpunit.PostMethodWebRequest;
-import com.meterware.httpunit.WebConversation;
-import com.meterware.httpunit.WebRequest;
-import com.meterware.httpunit.WebResponse;
-
-public class TokenAuthTestCase {
- private static SCANode node;
- private static HelloWorldService service;
-
- @BeforeClass
- public static void init() throws Exception {
- try {
- SCANodeFactory factory = SCANodeFactory.newInstance();
- node = factory.createSCANodeFromClassLoader("helloworld.composite",
- TokenAuthTestCase.class.getClassLoader());
- node.start();
-
- service = ((SCAClient)node).getService(HelloWorldService.class, "HelloWorldClientComponent");
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
-
- @AfterClass
- public static void destroy() throws Exception {
- node.stop();
- }
-
- @Test
- //@Ignore
- public void testViaSCAClient() {
- String greetings = service.getGreetings("Simon");
- System.out.println("Tokens reported at component context security subject = ");
- System.out.println(greetings);
- Assert.assertEquals("Hello Simon SomeWSAuthorizationToken Hello Simon DummyTokenID ", greetings);
- }
-
- @Test
- @Ignore
- public void testWSViaNonSCAClient() {
-
- try {
- String token ="MyToken";
- String encToken = Base64.encode(token.getBytes());
-
- String response = callService("http://L3AW203:8085/HelloWorldServiceWSComponent",
- "<?xml version='1.0' encoding='UTF-8'?>" +
- "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
- "<soapenv:Header>" +
- "<ns2:Token xmlns:ns2=\"http://helloworld/\">" + encToken + "</ns2:Token>" +
- "</soapenv:Header>" +
- "<soapenv:Body>" +
- "<ns2:getGreetings xmlns:ns2=\"http://helloworld/\">" +
- "<arg0>Simon</arg0>" +
- "</ns2:getGreetings>" +
- "</soapenv:Body>" +
- "</soapenv:Envelope>" );
- System.out.println(">>>" + response);
- } catch(Exception ex) {
- System.out.println(ex.toString());
- }
- }
-
- @Test
- @Ignore
- public void testJMSViaNonSCAClient() {
- // TODO
- }
-
- public String callService(String url, String requestString) throws Exception {
- System.out.println("Request = " + requestString);
- WebConversation wc = new WebConversation();
- wc.setAuthorization("Me", "MyPasswd");
- WebRequest request = new PostMethodWebRequest( url,
- new ByteArrayInputStream(requestString.getBytes("UTF-8")),"text/xml");
- request.setHeaderField("SOAPAction", "");
- WebResponse response = wc.getResource(request);
- System.out.println("Response= " + response.getText());
- Assert.assertEquals(200, response.getResponseCode());
- return response.getText();
- }
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/pom.xml
deleted file mode 100644
index 9a5dcf627b..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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-itest</artifactId>
- <version>1.5.1</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-policy-security</artifactId>
- <name>Apache Tuscany SCA iTest Policy Security</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.5.1</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/java/helloworld/HelloWorldImpl.java
deleted file mode 100644
index 0de3c70303..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/java/helloworld/HelloWorldImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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 helloworld;
-
-import org.osoa.sca.annotations.Service;
-
-/**
- * This class implements the HelloWorld service.
- */
-@Service(HelloWorldService.class)
-public class HelloWorldImpl implements HelloWorldService {
-
- public String getGreetings(String name) {
- return "Hello " + name;
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/java/helloworld/HelloWorldService.java
deleted file mode 100644
index 268d90e910..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/java/helloworld/HelloWorldService.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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 helloworld;
-
-import org.osoa.sca.annotations.Remotable;
-
-/**
- * This is the business interface of the HelloWorld greetings service.
- */
-@Remotable
-public interface HelloWorldService {
-
- public String getGreetings(String name);
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/resources/definitions.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/resources/definitions.xml
deleted file mode 100644
index c8118a0caf..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/resources/definitions.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://itest/policy"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:ip="http://itest/policy" >
-
- <policySet name="allowed_users" appliesTo="sca:implementation.java">
- <permitAll/>
- </policySet>
-
- <policySet name="runAsAdmin" appliesTo="sca:implementation.java">
- <runAs role="Administrator"/>
- </policySet>
-</definitions> \ No newline at end of file
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/resources/helloworld.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/resources/helloworld.composite
deleted file mode 100644
index 9e0f289f87..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/main/resources/helloworld.composite
+++ /dev/null
@@ -1,34 +0,0 @@
-<?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://itest/policy"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:ip="http://itest/policy"
- name="Helloworld">
-
- <component name="HelloWorldServiceComponent">
- <implementation.java class="helloworld.HelloWorldImpl" policySets="ip:allowed_users"/>
-
- <service name="HelloWorldService">
- <interface.java interface="helloworld.HelloWorldService"/>
- </service>
- </component>
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/test/java/org/apache/tuscany/sca/itest/PolicyIdentityTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/test/java/org/apache/tuscany/sca/itest/PolicyIdentityTestCase.java
deleted file mode 100644
index 9dad17741e..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy-security/src/test/java/org/apache/tuscany/sca/itest/PolicyIdentityTestCase.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.itest;
-
-import helloworld.HelloWorldService;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class PolicyIdentityTestCase {
- private static SCADomain domain;
- private static HelloWorldService service;
-
- @Test
- public void testPolicies() {
- //TODO
- String greetings = service.getGreetings("Luciano");
- System.out.println(">>>" + greetings);
- }
-
- @BeforeClass
- public static void init() throws Exception {
- try {
- domain = SCADomain.newInstance("helloworld.composite");
- } catch (Exception e) {
- e.printStackTrace();
- }
- service = domain.getService(HelloWorldService.class, "HelloWorldServiceComponent");
- }
-
- @AfterClass
- public static void destroy() throws Exception {
- domain.close();
- }
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/pom.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/pom.xml
deleted file mode 100644
index 7b69be8a08..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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-itest</artifactId>
- <version>1.5.1</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>itest-policy</artifactId>
- <name>Apache Tuscany SCA iTest Policy Framework</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
- <version>1.5.1</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- </dependency>
-
-
- </dependencies>
-</project>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/AddService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/AddService.java
deleted file mode 100644
index 3e56bf3fad..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/AddService.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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 calculator;
-
-import org.osoa.sca.annotations.Remotable;
-import org.osoa.sca.annotations.Service;
-
-/**
- * The Add service interface
- */
-@Remotable
-@Service
-//@Requires(PolicyQNames.TEST_INTENT_FIVE)
-public interface AddService {
-
- double add(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/AddServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/AddServiceImpl.java
deleted file mode 100644
index 7ca8fb04b5..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/AddServiceImpl.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the Add service
- */
-public class AddServiceImpl implements AddService {
-
- public double add(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Adding " + n1 + " and " + n2);
- return n1 + n2;
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorClient.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorClient.java
deleted file mode 100644
index 9abc488523..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorClient.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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 calculator;
-
-import javax.security.auth.login.Configuration;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-
-/**
- * This client program shows how to create an SCA runtime, start it,
- * and locate and invoke a SCA component
- */
-public class CalculatorClient {
- public static void main(String[] args) throws Exception {
- try {
- Configuration secConf = Configuration.getConfiguration();
- } catch ( java.lang.SecurityException e ) {
- if ( e.getMessage().equals("Unable to locate a login configuration") ) {
- System.setProperty("java.security.auth.login.config", "target/classes/CalculatorJass.config");
- } else {
- throw e;
- }
- }
-
- SCADomain scaDomain = SCADomain.newInstance("Calculator.composite");
-
- CalculatorService calculatorService =
- scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent");
-
- // Calculate
- System.out.println("Calling CalculatorServiceComponent configured with 'logging' " +
- "policy for subtract and divide operations...");
- System.out.println("3 + 2=" + calculatorService.add(3, 2));
- System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
- System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
- System.out.println("3 / 2=" + calculatorService.divide(3, 2));
-
- calculatorService =
- scaDomain.getService(CalculatorService.class, "AnotherCalculatorServiceComponent");
-
- // Calculate
- System.out.println("Calling CalculatorServiceComponent configured with 'logging' " +
- "for all operations in the implementation...");
- System.out.println("3 + 2=" + calculatorService.add(3, 2));
- System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
- System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
- System.out.println("3 / 2=" + calculatorService.divide(3, 2));
-
- scaDomain.close();
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorService.java
deleted file mode 100644
index a1880698ea..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorService.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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 calculator;
-
-/**
- * The Calculator service interface.
- */
-
-public interface CalculatorService {
-
- double add(double n1, double n2);
-
- double subtract(double n1, double n2);
-
- double multiply(double n1, double n2);
-
- double divide(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorServiceImpl.java
deleted file mode 100644
index 28ce0ec78a..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/CalculatorServiceImpl.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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 calculator;
-
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Requires;
-
-
-/**
- * An implementation of the Calculator service.
- */
-@Requires(PolicyQNames.TEST_INTENT_ONE)
-public class CalculatorServiceImpl implements CalculatorService, PolicyQNames {
-
- private AddService addService;
- private SubtractService subtractService;
- private MultiplyService multiplyService;
- private DivideService divideService;
-
- @Reference
- public void setAddService(AddService addService) {
- this.addService = addService;
- }
-
- //@Requires({TEST_INTENT_TWO, TEST_INTENT_THREE})
- @Reference
- public void setSubtractService(SubtractService subtractService) {
- this.subtractService = subtractService;
- }
-
- @Reference
- public void setDivideService(DivideService divideService) {
- this.divideService = divideService;
- }
-
- @Reference
- public void setMultiplyService(MultiplyService multiplyService) {
- this.multiplyService = multiplyService;
- }
-
- @Requires(TEST_INTENT_TWO)
- public double add(double n1, double n2) {
- return addService.add(n1, n2);
- }
-
- @Requires(PolicyQNames.QUALIFIED_TEST_INTENT_ONE)
- public double subtract(double n1, double n2) {
- return subtractService.subtract(n1, n2);
- }
-
- public double multiply(double n1, double n2) {
- return multiplyService.multiply(n1, n2);
- }
-
- //@Requires(QUALIFIED_TEST_INTENT_FOUR)
- public double divide(double n1, double n2) {
- return divideService.divide(n1, n2);
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/DivideService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/DivideService.java
deleted file mode 100644
index f72b05cece..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/DivideService.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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 calculator;
-
-import org.osoa.sca.annotations.Remotable;
-import org.osoa.sca.annotations.Service;
-
-/**
- * The divide service interface
- */
-@Remotable
-@Service
-public interface DivideService {
-
- double divide(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/DivideServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/DivideServiceImpl.java
deleted file mode 100644
index 1323edf55a..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/DivideServiceImpl.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the Divide service.
- */
-public class DivideServiceImpl implements DivideService {
-
- public double divide(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2);
- return n1 / n2;
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/MultiplyService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/MultiplyService.java
deleted file mode 100644
index 5290605938..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/MultiplyService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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 calculator;
-
-/**
- * The interface for the multiply service
- */
-public interface MultiplyService {
-
- double multiply(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/MultiplyServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/MultiplyServiceImpl.java
deleted file mode 100644
index 91b803bc9e..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/MultiplyServiceImpl.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the Multiply service.
- */
-public class MultiplyServiceImpl implements MultiplyService {
-
- public double multiply(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2);
- return n1 * n2;
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/PolicyQNames.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/PolicyQNames.java
deleted file mode 100644
index 3e1bc45842..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/PolicyQNames.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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 calculator;
-
-/**
- * @version $Rev$ $Date$
- */
-public interface PolicyQNames {
- public static final String QUALIFIER = ".";
-
- public static final String POLICY_ITEST_PREFIX="{http://itest/policy}";
- public static final String TEST_INTENT_ONE = POLICY_ITEST_PREFIX + "TestIntent_1";
- public static final String TEST_INTENT_TWO = POLICY_ITEST_PREFIX + "TestIntent_2";
- public static final String TEST_INTENT_THREE = POLICY_ITEST_PREFIX + "TestIntent_3";
- public static final String TEST_INTENT_FOUR = POLICY_ITEST_PREFIX + "TestIntent_4";
- public static final String TEST_INTENT_FIVE = POLICY_ITEST_PREFIX + "TestIntent_5";
-
- public static final String QUALIFIER_ONE = "Qualifier_1";
-
- public static final String QUALIFIED_TEST_INTENT_FOUR =
- TEST_INTENT_FOUR + QUALIFIER + QUALIFIER_ONE;
-
- public static final String QUALIFIED_TEST_INTENT_ONE =
- TEST_INTENT_ONE + QUALIFIER + QUALIFIER_ONE;
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/SubtractService.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/SubtractService.java
deleted file mode 100644
index bf0d1882b6..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/SubtractService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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 calculator;
-
-/**
- * The interface for the multiply service
- */
-public interface SubtractService {
-
- double subtract(double n1, double n2);
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/SubtractServiceImpl.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/SubtractServiceImpl.java
deleted file mode 100644
index 58cc4a3547..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/SubtractServiceImpl.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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 calculator;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of the subtract service.
- */
-public class SubtractServiceImpl implements SubtractService {
-
- public double subtract(double n1, double n2) {
- Logger logger = Logger.getLogger("calculator");
- logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2);
- return n1 - n2;
- }
-
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestImplPolicyHandler.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestImplPolicyHandler.java
deleted file mode 100644
index 4b04a4d0b8..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestImplPolicyHandler.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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 calculator.policy;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Message;
-import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.util.PolicyHandler;
-import org.junit.Assert;
-
-/**
- * @version $Rev$ $Date$
- */
-public class TestImplPolicyHandler implements PolicyHandler {
- private PolicySet applicablePolicySet = null;
-
- public void afterInvoke(Object... arg0) {
- }
-
- public void beforeInvoke(Object... context) {
- for ( Object contextObj : context) {
- if ( contextObj instanceof Operation ) {
- Operation op = (Operation)contextObj;
- //System.out.println(" *TestImplPolicyHandler* " + op.getName() + " ** " + applicablePolicySet);
- if ( op.getName().equals("add") ) {
- boolean match = applicablePolicySet.getName().getLocalPart().equals("TestPolicySet_1_implementation") ||
- applicablePolicySet.getName().getLocalPart().equals("TestPolicySet_2_implementation") ||
- applicablePolicySet.getName().getLocalPart().equals("TestPolicySet_1_Qualified_implementation") ||
- applicablePolicySet.getName().getLocalPart().equals("TestPolicySet_3_implementation") ;
- Assert.assertTrue(match);
- } else if ( op.getName().equals("subtract") ) {
- boolean match = applicablePolicySet.getName().getLocalPart().equals("TestPolicySet_1_Qualified_implementation") ||
- applicablePolicySet.getName().getLocalPart().equals("TestPolicySet_1_implementation");
- Assert.assertTrue(match);
- } else if ( op.getName().equals("divide")) {
- Assert.assertEquals(applicablePolicySet.getName().getLocalPart(),
- "TestPolicySet_1_implementation");
- } else if ( op.getName().equals("multiply") ) {
- boolean match = applicablePolicySet.getName().getLocalPart().equals("TestPolicySet_5_implementation") ||
- applicablePolicySet.getName().getLocalPart().equals("TestPolicySet_1_implementation");
- Assert.assertTrue(match);
- }
- else {
- Assert.fail();
- }
- //System.out.println(" *TestImplPolicyHandler* " + op.getName() + " ** " + applicablePolicySet);
- } else if ( contextObj instanceof Message ) {
- Message msg = (Message)contextObj;
- System.out.println(" *TestImplPolicyHandler* " + msg.getOperation().getName() + " ** " + applicablePolicySet);
- }
- }
- }
-
- public void cleanUp(Object... arg0) {
- }
-
- public PolicySet getApplicablePolicySet() {
- return applicablePolicySet;
- }
-
- public void setApplicablePolicySet(PolicySet arg0) {
- this.applicablePolicySet = arg0;
- }
-
- public void setUp(Object... arg0) {
- }
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestRefPolicyHandler.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestRefPolicyHandler.java
deleted file mode 100644
index 3dcadd724e..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestRefPolicyHandler.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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 calculator.policy;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Message;
-import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.util.PolicyHandler;
-
-/**
- * @version $Rev$ $Date$
- */
-public class TestRefPolicyHandler implements PolicyHandler {
- private PolicySet applicablePolicySet = null;
-
- public void afterInvoke(Object... arg0) {
- }
-
- public void beforeInvoke(Object... context) {
- for ( Object contextObj : context) {
- if ( contextObj instanceof Operation ) {
- Operation op = (Operation)contextObj;
- System.out.println(" *TestReflPolicyHandler* " + op.getName() + " ** " + applicablePolicySet);
- } else if ( contextObj instanceof Message ) {
- Message msg = (Message)contextObj;
- System.out.println(" *TestRefPolicyHandler* " + msg.getOperation().getName() + " ** " + applicablePolicySet);
- }
- }
- }
-
- public void cleanUp(Object... arg0) {
- }
-
- public PolicySet getApplicablePolicySet() {
- return applicablePolicySet;
- }
-
- public void setApplicablePolicySet(PolicySet arg0) {
- this.applicablePolicySet = arg0;
- }
-
- public void setUp(Object... arg0) {
- }
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestSvcPolicyHandler.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestSvcPolicyHandler.java
deleted file mode 100644
index 3d314a9d14..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/java/calculator/policy/TestSvcPolicyHandler.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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 calculator.policy;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Message;
-import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.util.PolicyHandler;
-
-/**
- * @version $Rev$ $Date$
- */
-public class TestSvcPolicyHandler implements PolicyHandler {
- private PolicySet applicablePolicySet = null;
-
- public void afterInvoke(Object... arg0) {
- }
-
- public void beforeInvoke(Object... context) {
- for ( Object contextObj : context) {
- if ( contextObj instanceof Operation ) {
- Operation op = (Operation)contextObj;
- System.out.println(" *TestSvcPolicyHandler* " + op.getName() + " ** " + applicablePolicySet);
- } else if ( contextObj instanceof Message ) {
- Message msg = (Message)contextObj;
- System.out.println(" *TestSvcPolicyHandler* " + msg.getOperation().getName() + " ** " + applicablePolicySet);
- }
- }
- }
-
- public void cleanUp(Object... arg0) {
- }
-
- public PolicySet getApplicablePolicySet() {
- return applicablePolicySet;
- }
-
- public void setApplicablePolicySet(PolicySet arg0) {
- this.applicablePolicySet = arg0;
- }
-
- public void setUp(Object... arg0) {
- }
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/Calculator.composite b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/Calculator.composite
deleted file mode 100644
index aed7684099..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/Calculator.composite
+++ /dev/null
@@ -1,66 +0,0 @@
-<?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" xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://itest/policy" xmlns:sample="http://itest/policy" name="Calculator"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:ip="http://itest/policy">
-
- <component name="CalculatorServiceComponent">
- <implementation.java class="calculator.CalculatorServiceImpl"></implementation.java>
- <!-- reference name="addService" target="AddServiceComponent" /-->
- <reference name="addService">
- <interface.java interface="calculator.AddService" />
- <binding.ws uri="http://localhost:8085/AddServiceComponentWS" />
- </reference>
- <reference name="subtractService" target="SubtractServiceComponent" />
- <reference name="multiplyService" target="MultiplyServiceComponent" />
- <reference name="divideService" target="DivideServiceComponent" />
- </component>
-
- <component name="AddServiceComponent">
- <implementation.java class="calculator.AddServiceImpl" requires="ip:TestIntent_3" />
- <service name="AddService">
- <interface.java interface="calculator.AddService" />
- <binding.ws uri="http://localhost:8085/AddServiceComponentWS" />
- <binding.sca/>
- </service>
- </component>
-
- <component name="SubtractServiceComponent">
- <implementation.java class="calculator.SubtractServiceImpl" />
- </component>
-
- <component name="MultiplyServiceComponent">
- <implementation.java class="calculator.MultiplyServiceImpl" />
- </component>
-
- <component name="DivideServiceComponent">
- <implementation.java class="calculator.DivideServiceImpl" />
- </component>
-
- <component name="AnotherCalculatorServiceComponent">
- <implementation.java class="calculator.CalculatorServiceImpl" />
- <reference name="addService" target="AddServiceComponent" />
- <reference name="subtractService" target="SubtractServiceComponent" />
- <reference name="multiplyService" target="MultiplyServiceComponent" />
- <reference name="divideService" target="DivideServiceComponent" />
- </component>
-
-</composite>
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
deleted file mode 100644
index a20489035b..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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.
-
-# Implementation class for the artifact processor extension
-org.apache.tuscany.sca.itest.TestPolicyProcessor;qname=http://schemas.xmlsoap.org/ws/2004/09/policy#Policy,model=org.apache.tuscany.sca.itest.Policy
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler
deleted file mode 100644
index d9f144b3ff..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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.
-#
-# PolicyHandlerClasses to interpret specific PolicyModels against specific QoS infrastructures
-# handler classname;qname=<policy intent addressed>;model=<policy model class>
-calculator.policy.TestImplPolicyHandler;intent=http://itest/policy#TestIntent_1,model=org.apache.neethi.Policy,appliesTo=sca:implementation.java
-calculator.policy.TestRefPolicyHandler;intent=http://itest/policy#TestIntent_1,model=org.apache.neethi.Policy,appliesTo=sca:reference
-calculator.policy.TestSvcPolicyHandler;intent=http://itest/policy#TestIntent_1,model=org.apache.neethi.Policy,appliesTo=sca:service
-calculator.policy.TestImplPolicyHandler;intent=http://itest/policy#TestIntent_1.Qualifier_1,model=org.apache.neethi.Policy,appliesTo=sca:implementation.java
-calculator.policy.TestImplPolicyHandler;intent=http://itest/policy#TestIntent_2,model=org.apache.neethi.Policy,appliesTo=sca:implementation.java
-calculator.policy.TestRefPolicyHandler;intent=http://itest/policy#TestIntent_2,model=org.apache.neethi.Policy,appliesTo=sca:reference
-calculator.policy.TestSvcPolicyHandler;intent=http://itest/policy#TestIntent_2,model=org.apache.neethi.Policy,appliesTo=sca:service
-calculator.policy.TestImplPolicyHandler;intent=http://itest/policy#TestIntent_3,model=org.apache.neethi.Policy,appliesTo=sca:implementation.java
-calculator.policy.TestImplPolicyHandler;intent=http://itest/policy#TestIntent_5,model=org.apache.neethi.Policy,appliesTo=sca:implementation.java \ No newline at end of file
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/definitions.xml b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/definitions.xml
deleted file mode 100644
index 0009d712f3..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/main/resources/definitions.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-<?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://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://itest/policy"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- xmlns:calc="http://calculator"
- xmlns:ip="http://itest/policy" >
-
- <!-- Policy Intents -->
- <sca:intent name="TestIntent_1" constrains="sca:implementation.java sca:binding.ws">
- <description>Test Intent One</description>
- </sca:intent>
-
- <sca:intent name="TestIntent_2" constrains="sca:implementation.java sca:binding.ws">
- <description>Test Intent Two</description>
- </sca:intent>
-
- <sca:intent name="TestIntent_3" constrains="sca:implementation.java sca:binding.ws">
- <description>Test Intent Three</description>
- </sca:intent>
-
- <sca:intent name="TestIntent_4" constrains="sca:implementation.java sca:binding.ws">
- <description>Test Intent Four</description>
- </sca:intent>
-
- <sca:intent name="TestIntent_5" constrains="sca:implementation.java sca:binding.ws">
- <description>Test Intent Five</description>
- </sca:intent>
-
- <sca:intent name="TestIntent_1.Qualifier_1" />
- <sca:intent name="TestIntent_4.Qualifier_1" />
-
- <!-- PolicySets -->
- <sca:policySet name="TestPolicySet_1_implementation" provides="ip:TestIntent_1"
- appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <intentMap provides="ip:TestIntent_1" default="Qualifier_1">
- <qualifier name="Qualifier_1">
- <wsp:Policy />
- </qualifier>
- </intentMap>
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_1_Qualified_implementation" provides="ip:TestIntent_1.Qualifier_1"
- appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_1_reference" provides="ip:TestIntent_1" appliesTo="sca:reference"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_1_service" provides="ip:TestIntent_1" appliesTo="sca:service"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:intent name="TestIntent_4.Qualifier_1" />
-
- <sca:policySet name="TestPolicySet_2_implementation" provides="ip:TestIntent_2"
- appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_2_reference" provides="ip:TestIntent_2" appliesTo="sca:reference"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_2_service" provides="ip:TestIntent_2" appliesTo="sca:service"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
-
- <sca:policySet name="TestPolicySet_3_implementation" provides="ip:TestIntent_3"
- appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_3_reference" provides="ip:TestIntent_3" appliesTo="sca:reference"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_3_service" provides="ip:TestIntent_3" appliesTo="sca:service"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_4_implementation" provides="ip:TestIntent_4"
- appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_4_service" provides="ip:TestIntent_4" appliesTo="sca:service"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_4_reference" provides="ip:TestIntent_4" appliesTo="sca:reference"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_5_implementation" provides="" appliesTo="sca:implementation.java"
- tuscany:alwaysAppliesTo="sca:component[@name='MultiplyServiceComponent']"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_5_service" provides="ip:TestIntent_5" appliesTo="sca:service"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_5_reference" provides="ip:TestIntent_5" appliesTo="sca:reference"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:Policy />
- </sca:policySet>
-
- <sca:policySet name="TestPolicySet_4_qualified_1_implementation" provides="ip:TestIntent_4"
- appliesTo="sca:implementation.java" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <intentMap provides="ip:TestIntent_4" default="Qualifier_1">
- <qualifier name="Qualifier_1">
- <wsp:Policy />
- </qualifier>
- </intentMap>
- </sca:policySet>
-</definitions> \ No newline at end of file
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/PoliciedCalculatorTestCase.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/PoliciedCalculatorTestCase.java
deleted file mode 100644
index 885e8314ef..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/PoliciedCalculatorTestCase.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.itest;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import calculator.CalculatorService;
-
-public class PoliciedCalculatorTestCase {
- private static SCADomain domain;
- private static CalculatorService calculatorService;
-
- @Test
- public void testPolicies() {
- calculatorService.add(10, 10);
- calculatorService.multiply(10, 10);
- calculatorService.divide(10, 10);
- calculatorService.subtract(10, 10);
- }
-
- @BeforeClass
- public static void init() throws Exception {
- try {
- domain = SCADomain.newInstance("Calculator.composite");
- } catch (Exception e) {
- e.printStackTrace();
- }
- calculatorService = domain.getService(CalculatorService.class, "CalculatorServiceComponent");
- }
-
- @AfterClass
- public static void destroy() throws Exception {
- domain.close();
- }
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/Policy.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/Policy.java
deleted file mode 100644
index ba17755b88..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/Policy.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.itest;
-
-import javax.xml.namespace.QName;
-
-/**
- * Interface that will abstract various types of policy specifications
- * and attachments for example WS-Policy
- *
- * @version $Rev$ $Date$
- */
-public interface Policy {
- QName getSchemaName();
- void setUnresolved(boolean unresolved);
- boolean isUnresolved();
-}
diff --git a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java b/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java
deleted file mode 100644
index ff47988bce..0000000000
--- a/sca-java-1.x/tags/1.5.1-RC3/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.itest;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.policy.Policy;
-import org.apache.tuscany.sca.policy.PolicyFactory;
-
-/**
- * A PolicyProcessor used for testing.
- *
- * @version $Rev$ $Date$
- */
-public class TestPolicyProcessor implements StAXArtifactProcessor<Policy> {
-
- public TestPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
-
- }
-
- public QName getArtifactType() {
- return new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "Policy");
- }
-
- public Policy read(XMLStreamReader arg0) throws ContributionReadException, XMLStreamException {
- return new MockPolicyImplOne();
- }
-
- public void write(Policy arg0, XMLStreamWriter arg1) throws ContributionWriteException,
- XMLStreamException {
- }
-
- public Class<Policy> getModelType() {
- // TODO Auto-generated method stub
- return Policy.class;
- }
-
- public void resolve(Policy arg0, ModelResolver arg1) throws ContributionResolveException {
-
- }
-
-
- public class MockPolicyImplOne implements Policy {
- public QName getSchemaName() {
- return new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "Policy");
- }
-
- public boolean isUnresolved() {
- return false;
- }
-
- public void setUnresolved(boolean unresolved) {
- }
-
- }
-}