diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-10-26 14:06:37 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-10-26 14:06:37 +0000 |
commit | 5c4a561575759f774e82a50adce80ccc2fcb415c (patch) | |
tree | 3f7367f2f6d0613bd31d43ac4001043b3314dee9 /sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws | |
parent | 5035e611bbff453189e2ef3894b67f2be38c037f (diff) |
Delete old rc1 tag
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1027565 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws')
5 files changed, 0 insertions, 452 deletions
diff --git a/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/pom.xml b/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/pom.xml deleted file mode 100644 index ab6305d9af..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/pom.xml +++ /dev/null @@ -1,129 +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-compliance-tests</artifactId> - <version>2.0-Beta1</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>tuscany-compliance-test-binding-ws</artifactId> - <name>Apache Tuscany SCA Specification Compliance Tests Binding WS</name> - - <dependencies> - - <dependency> - <!-- This is only needed to get the module working in Eclipse which doesn't pick it up from the dependency plugin unpack --> - <!-- The dependency plugin unpack is needed as presently the surefire plugin wont run tests in a dependency jar --> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>oasis-binding-ws-test-runner</artifactId> - <version>1.0-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca.shades</groupId> - <artifactId>tuscany-base</artifactId> - <version>2.0-Beta1</version> - </dependency> - - <!-- This is need when running with Sun JDK which gets an unsupported operation exception creating an XMLStreamReader from a DOMSource - when Tuscany is writing a property value --> - <dependency> - <groupId>org.codehaus.woodstox</groupId> - <artifactId>wstx-asl</artifactId> - <version>3.2.4</version> - <scope>runtime</scope> - <exclusions> - <exclusion> - <groupId>stax</groupId> - <artifactId>stax-api</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - <scope>test</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - <plugins> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludes> - <!-- exclude>**/BWS_2003_TestCase.java</exclude --> - <!-- exclude>**/BWS_2006_TestCase.java</exclude --> - <!-- exclude>**/BWS_2008_TestCase.java</exclude --> - <!-- exclude>**/BWS_2009_TestCase.java</exclude --> - <!-- exclude>**/BWS_2011_TestCase.java</exclude --> - <!-- exclude>**/BWS_2013_TestCase.java</exclude --> - <!-- exclude>**/BWS_2016_TestCase.java</exclude --> - <!-- exclude>**/BWS_2017_TestCase.java</exclude --> - <!-- exclude>**/BWS_4007_TestCase.java</exclude --> - <!-- exclude>**/BWS_5001_TestCase.java</exclude --> - </excludes> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>unpack</id> - <phase>test-compile</phase> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>oasis-binding-ws-contributions</artifactId> - <version>1.0-SNAPSHOT</version> - <type>zip</type> - <outputDirectory>${project.build.directory}/oasis-contributions</outputDirectory> - </artifactItem> - <artifactItem> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>oasis-binding-ws-test-runner</artifactId> - <version>1.0-SNAPSHOT</version> - <type>jar</type> - <excludes>commons-logging.properties,oasis-sca-tests.properties</excludes> - <outputDirectory>${project.build.directory}/test-classes</outputDirectory> - </artifactItem> - </artifactItems> - </configuration> - </execution> - </executions> - </plugin> - - </plugins> - </build> -</project> diff --git a/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/sca_variables.dtd b/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/sca_variables.dtd deleted file mode 100644 index f29713a20d..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/sca_variables.dtd +++ /dev/null @@ -1,28 +0,0 @@ -<!--
- *
- * Copyright(C) OASIS(R) 2005,2010. All Rights Reserved.
- * OASIS trademark, IPR and other policies apply.
- *
--->
-<!--
- * This DTD forms part of the SCA Web Service Binding Test Suite.
- * It declares a number of XML Entities which are used in Entity References in some of the
- * composites that are artifacts used in the testcases.
- *
- * The values declared in the Entity References are intended to reflect SCA runtime specific
- * values for certain aspects of the composites at runtime - in particular addresses of some
- * services.
- *
- * It is permitted - indeed it is expected - that an SCA runtime provider will MODIFY the values
- * declared for the Entity References to match the values which would be expected when running the
- * SCA Web Service Binding test suite against a given SCA runtime. The values held in the this file are
- * examples, derived from running the test suite against the Apache Tuscany SCA runtime.
--->
-<!-- Address of the Web service provided by component "BWS_2004Component2" in Test_BWS_2004 composite -->
-<!ENTITY ws_addr_2004 "http://localhost:8080/TEST_BWS_2004Component2/Service1">
-<!-- Address of the Web service provided by component "BWS_2006Component2" in Test_BWS_2006 composite -->
-<!ENTITY ws_addr_2006_A "http://localhost:8080/TEST_BWS_2006Component2/Service1">
-<!-- Address of the Web service provided by component "BWS_2006Component3" in Test_BWS_2006 composite -->
-<!ENTITY ws_addr_2006_B "http://localhost:8080/TEST_BWS_2006Component3/Service1">
-<!-- Address of the Web service provided by the client for a range of BWS testcases -->
-<!ENTITY ws_addr_client_1 "http://localhost:9081/JAXWS/Service1">
\ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java deleted file mode 100644 index 6f4aa8e86a..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java +++ /dev/null @@ -1,238 +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.otest; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -import client.RuntimeBridge; -import client.TestConfiguration; - -/** - * An implementation of the Runtime Bridge for the Apache Tuscany SCA runtime (version 2.x) - * - */ -public class TuscanyRuntimeBridge implements RuntimeBridge { - - static final String CONTRIBUTION_LOCATION_PROPKEY = "OASIS_TESTENV_CONTRIBUTION_LOCATION"; - - protected NodeFactory launcher; - protected Node node; - protected Properties expectedErrorMessages; - - TestConfiguration testConfiguration = null; - - public TuscanyRuntimeBridge() { - // read test error mapping - expectedErrorMessages = new Properties(); - try { - InputStream propertiesStream = this.getClass().getResourceAsStream("/tuscany-oasis-sca-tests-errors.properties"); - expectedErrorMessages.load(propertiesStream); - } catch (IOException e) { - System.out.println("Unable to read oasis-sca-tests-errors.properties file"); - } - } - - public TestConfiguration getTestConfiguration() { - return testConfiguration; - } - - public void setTestConfiguration(TestConfiguration testConfiguration) { - this.testConfiguration = testConfiguration; - } - - public boolean startContribution(String compositeName, - String contributionLocation, String[] contributionNames) - throws Exception { - //TODO: - return startContribution(contributionLocation, contributionNames); - } - - public boolean startContribution(String contributionLocation, String[] contributionNames) throws Exception { - try { - // Tuscany specific code which starts the contribution(s) holding the test - Properties ps = new Properties(); - ps.setProperty("defaultScheme", "vm"); - ps.setProperty("org.apache.tuscany.sca.binding.ws.jaxws.ri.JAXWSBindingProviderFactory.defaultPort", "8080"); - launcher = NodeFactory.newInstance(ps); - - Contribution[] contributions = new Contribution[contributionNames.length]; - String[] contributionURIs = getContributionURIs(contributionLocation); - for (int i = 0; i < contributions.length; i++) { - contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]); - } // end for - - node = launcher.createNode(testConfiguration.getComposite(), contributions); - // Start the node - node.start(); - - // For debugging - // print out the composites that have been read in success cases - // System.out.println(((NodeImpl)node).dumpDomainComposite()); - } catch (Exception e) { - System.out.println(e.getMessage()); - e.printStackTrace(); - throw e; - } // end try - - return true; - } // end method startContribution - - /** - * Gets the location of the Contributions as URIs - * @param contributionLocation - a location pattern URI, which contains one or more "%1" - * substrings, which are substituted with the name of the contribution to get the URI of - * the contribution - * @return the contribution locations as an array of Strings - */ - protected String[] getContributionURIs(String contributionLocation) throws Exception { - String[] locations; - locations = testConfiguration.getContributionNames(); - - if (locations != null && contributionLocation != null) { - - for (int i = 0; i < locations.length; i++) { - String aLocation = contributionLocation.replaceAll("%1", locations[i]); - // Looks like bugs in the oasis code that sometimes still uses jars for some - if (aLocation.endsWith("_POJO.zip") && !aLocation.endsWith("ASM_8005_Java-1.0.zip")) { - aLocation = aLocation.substring(0, aLocation.length()-3) + "jar"; - } - if (!(new File(aLocation)).exists()) { - aLocation = aLocation.replace(".zip", ".jar"); - } - locations[i] = aLocation; - } // end for - } else { - if (locations == null) { - // No contribution specified - throw an Exception - throw new Exception("Unable to start SCA runtime - no contribution supplied - error"); - } else { - // No contribution location supplied - throw an Exception - throw new Exception("Unable to start SCA runtime - no contribution location supplied - error"); - } // end if - } // end if - - return locations; - } // end getContributionURI - - public void stopContribution() { - if (node != null) { - node.stop(); - } // end if - if (launcher != null) { - launcher.destroy(); - } // end if - } // end method stopContribution - - public String getContributionLocation(Class<?> testClass) { - return ContributionLocationHelper.getContributionLocation(testConfiguration.getTestClass()); - } // end method getContributionLocation - - public void checkError(String testName, Throwable ex) throws Throwable { - - String expectedMessage = expectedErrorMessages.getProperty(testName); - String receivedMessage = ex.getMessage(); - - if (expectedMessage == null){ - writeMissingMessage(testName, ex); - fail("Null expected error message for test " + testName + - "Please add message to oasis-sca-tests-errors.properties"); - } // end if - - if (receivedMessage == null){ - ex.printStackTrace(); - fail("Null received error message for test " + testName); - } // end if - - if (expectedMessage.startsWith("*")) { - // allow using * to ignore a message comparison - return; - } - - // Deal with the case where the message has variable parts within it - // marked with the characters ***. Here we tokenize the epected string - // and make sure all the individual parts are present in the results string - String expectedMessageParts[] = expectedMessage.split("\\*\\*\\*"); - - if (expectedMessageParts.length > 1){ - int foundParts = 0; - for(int i = 0; i < expectedMessageParts.length; i++){ - if (receivedMessage.indexOf(expectedMessageParts[i]) > -1 ){ - foundParts++; - } - } - - if (foundParts == expectedMessageParts.length){ - return; - } - } - - - // Deal with the case where the end of the message is variable (eg contains absolute filenames) - // and where the only relevant part is the start of the message - in this case the expected - // message only contains the stem section which is unchanging... - if( receivedMessage.length() > expectedMessage.length() ) { - // Truncate the received message to the length of the expected message - receivedMessage = receivedMessage.substring(0, expectedMessage.length() ); - } // end if - - if (!expectedMessage.equals(receivedMessage)) { - writeIncorrectMessage(testName, expectedMessage, receivedMessage); - } - - assertEquals( expectedMessage, receivedMessage ); - - return; - - } - - protected void writeMissingMessage(String testName, Throwable ex) { - try { - BufferedWriter out = new BufferedWriter(new FileWriter("target/OTestMissingMsgs.txt", true)); - out.write(testName + "=*"); - out.newLine(); - out.close(); - } catch (IOException e) { - } - } - - protected void writeIncorrectMessage(String testName, String expected, String received) { - try { - BufferedWriter out = new BufferedWriter(new FileWriter("target/OTestIncorrectMsgs.txt", true)); - out.write(testName); out.newLine(); - out.write(" " + expected); out.newLine(); - out.write(" " + received); out.newLine(); - out.close(); - } catch (IOException e) { - } - } - -} // end class TuscanyRuntimeBridge diff --git a/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/src/test/resources/oasis-sca-tests.properties b/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/src/test/resources/oasis-sca-tests.properties deleted file mode 100644 index 33192c49e5..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/src/test/resources/oasis-sca-tests.properties +++ /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. - -# OASIS SCA Assembly test properties -# The implementation type to use for Assembly test suite -# org.oasis.sca.tests.assembly.lang=BPEL -org.oasis.sca.tests.assembly.lang=Java - -# The class to use as the Runtime Bridge for the SCA runtime under test -#org.oasis.sca.tests.assembly.runtime_bridge=org.apache.tuscany.sca.otest.TuscanyOSGiRuntimeBridge -org.oasis.sca.tests.assembly.runtime_bridge=org.apache.tuscany.sca.otest.TuscanyRuntimeBridge - -# The location of the contributions for the test suite -# %1 represents the placement of the name of each contribution into the location URI -org.oasis.sca.tests.assembly.contribution.location=target/oasis-contributions/%1.zip - diff --git a/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/src/test/resources/tuscany-oasis-sca-tests-errors.properties deleted file mode 100644 index 4e8b4e5cbd..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC1/compliance-tests/binding-ws/src/test/resources/tuscany-oasis-sca-tests-errors.properties +++ /dev/null @@ -1,27 +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. -BWS_2020=* -BWS_3001=* -BWS_4008=* -BWS_2007=* -BWS_2018=* -BWS_2005=* -BWS_2001=* -BWS_2022=* -BWS_2002=* -BWS_2019=* - |