From e5b7380c874745c989d1816b8f552504f038e1bc Mon Sep 17 00:00:00 2001 From: lresende Date: Thu, 26 Sep 2013 20:33:20 +0000 Subject: 2.0 branch for possible maintenance release git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1526672 13f79535-47bb-0310-9956-ffa450edef68 --- .../2.0/testing/compliance-tests/assembly/pom.xml | 129 ++++++++++++ .../tuscany/sca/otest/TuscanyRuntimeBridge.java | 217 ++++++++++++++++++++ .../src/test/resources/oasis-sca-tests.properties | 30 +++ .../tuscany-oasis-sca-tests-errors.properties | 95 +++++++++ .../testing/compliance-tests/binding-jms/pom.xml | 128 ++++++++++++ .../tuscany/sca/otest/TuscanyRuntimeBridge.java | 220 ++++++++++++++++++++ .../binding-jms/src/test/resources/jndi.properties | 119 +++++++++++ .../src/test/resources/oasis-sca-tests.properties | 30 +++ .../tuscany-oasis-sca-tests-errors.properties | 49 +++++ .../testing/compliance-tests/binding-ws/pom.xml | 125 ++++++++++++ .../compliance-tests/binding-ws/sca_variables.dtd | 28 +++ .../tuscany/sca/otest/TuscanyRuntimeBridge.java | 217 ++++++++++++++++++++ .../src/test/resources/oasis-sca-tests.properties | 30 +++ .../tuscany-oasis-sca-tests-errors.properties | 33 +++ .../2.0/testing/compliance-tests/java-caa/pom.xml | 131 ++++++++++++ .../tuscany/sca/otest/TuscanyRuntimeBridge.java | 224 +++++++++++++++++++++ .../src/test/resources/oasis-sca-tests.properties | 30 +++ .../tuscany-oasis-sca-tests-errors.properties | 80 ++++++++ .../2.0/testing/compliance-tests/java-ci/pom.xml | 122 +++++++++++ .../tuscany/sca/otest/TuscanyRuntimeBridge.java | 217 ++++++++++++++++++++ .../src/test/resources/oasis-sca-tests.properties | 30 +++ .../tuscany-oasis-sca-tests-errors.properties | 39 ++++ .../2.0/testing/compliance-tests/policy/pom.xml | 128 ++++++++++++ .../tuscany/sca/otest/TuscanyRuntimeBridge.java | 218 ++++++++++++++++++++ .../src/test/resources/oasis-sca-tests.properties | 30 +++ .../tuscany-oasis-sca-tests-errors.properties | 57 ++++++ .../branches/2.0/testing/compliance-tests/pom.xml | 78 +++++++ 27 files changed, 2834 insertions(+) create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/pom.xml create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/resources/oasis-sca-tests.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/resources/tuscany-oasis-sca-tests-errors.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/pom.xml create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/jndi.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/oasis-sca-tests.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/tuscany-oasis-sca-tests-errors.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/pom.xml create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/sca_variables.dtd create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/resources/oasis-sca-tests.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/resources/tuscany-oasis-sca-tests-errors.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/pom.xml create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/resources/oasis-sca-tests.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/resources/tuscany-oasis-sca-tests-errors.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/pom.xml create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/resources/oasis-sca-tests.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/resources/tuscany-oasis-sca-tests-errors.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/policy/pom.xml create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/resources/oasis-sca-tests.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/resources/tuscany-oasis-sca-tests-errors.properties create mode 100644 sca-java-2.x/branches/2.0/testing/compliance-tests/pom.xml (limited to 'sca-java-2.x/branches/2.0/testing/compliance-tests') diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/pom.xml b/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/pom.xml new file mode 100644 index 0000000000..72877a62c3 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/pom.xml @@ -0,0 +1,129 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-compliance-tests + 2.0 + ../pom.xml + + tuscany-compliance-test-assembly + Apache Tuscany SCA Specification Compliance Tests Assembly + + + + + + + + + org.apache.tuscany.sca + tuscany-base-runtime + 2.0 + + + + org.apache.tuscany.sca + tuscany-binding-ws-runtime-axis2 + 2.0 + + + + org.mortbay.jetty + jetty + 6.1.19 + test + + + + org.codehaus.woodstox + wstx-asl + 3.2.9 + + + + junit + junit + 4.5 + test + + + + + com.sun.xml.ws + jaxws-rt + 2.1.7 + + + + + + ${project.artifactId} + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Xms256m -Xmx1024m + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + process-classes + + unpack + + + + + org.apache.tuscany.sca + oasis-assembly-contributions + 2.0-SNAPSHOT + zip + ${project.build.directory}/oasis-contributions + + + org.apache.tuscany.sca + tuscany-otests-asm-tests + 2.0-SNAPSHOT + jar + commons-logging.properties,oasis-sca-tests.properties + ${project.build.directory}/test-classes + + + + + + + + + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java new file mode 100644 index 0000000000..e7a161ae13 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java @@ -0,0 +1,217 @@ +/* + * 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.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.Node; +import org.apache.tuscany.sca.node.NodeFactory; + +import testClient.TestException_Exception; +import client.RuntimeBridge; + +/** + * 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; + + 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 boolean startContribution(String compositeName, String contributionLocation, String[] contributionNames) throws Exception { + try { + // Tuscany specific code which starts the contribution(s) holding the test + launcher = NodeFactory.newInstance(); + + Contribution[] contributions = new Contribution[contributionNames.length]; + String[] contributionURIs = getContributionURIs(contributionLocation, contributionNames); + for (int i = 0; i < contributions.length; i++) { + contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]); + } // end for + + node = launcher.createNode(compositeName, 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, String[] contributionNames) throws Exception { + String[] locations = new String[contributionNames.length]; + + if (locations != null && contributionLocation != null) { + + for (int i = 0; i < locations.length; i++) { + String aLocation = contributionLocation.replaceAll("%1", contributionNames[i]); + + 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 void checkError(String testName, Throwable ex) throws Throwable { + + String expectedMessage = expectedErrorMessages.getProperty(testName); + String receivedMessage = getErrorMessage(ex);//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 expected 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) { + } + } + + protected String getErrorMessage(Throwable ex) { + String errorMessage = null; + + if (ex instanceof TestException_Exception) { + TestException_Exception te = (TestException_Exception) ex; + errorMessage = te.getFaultInfo().getMessage(); + } else { + errorMessage = ex.getMessage(); + } + + return errorMessage; + } +} // end class TuscanyRuntimeBridge diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/resources/oasis-sca-tests.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/resources/oasis-sca-tests.properties new file mode 100644 index 0000000000..2601b6b9fc --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/resources/oasis-sca-tests.properties @@ -0,0 +1,30 @@ +# 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/target/%1.zip + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/resources/tuscany-oasis-sca-tests-errors.properties new file mode 100644 index 0000000000..e2c5f97b03 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/assembly/src/test/resources/tuscany-oasis-sca-tests-errors.properties @@ -0,0 +1,95 @@ +# 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. + +ASM_4002=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40003,ASM60003,JCA90045] Duplicate implementation service name: Component = TestComponent1 Service = Service1 +ASM_4003=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = TestComponent1 Reference = Reference1 +ASM_4004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40005,ASM60014] Duplicate implementation property name: Component = TestComponent1 Property = propertyName +ASM_4007=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - propertyName +ASM_4008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40011,ASM60034] No value configured on a mustSupply property: Component = TestComponent1 Property = propertyName +ASM_5004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient] - [ASM50022] Too many targets on reference: reference1 +ASM_5005=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: Test_ASM_5005Component1] - [ASM40003,ASM60003,JCA90045] Duplicate implementation service name: Component = Test_ASM_5005Component1 Service = Service1 +ASM_5006=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Component type service not found for component service (missing @Remotable annotation?): Component = TestComponent1 Service = InvalidName +ASM_5007=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: Test_ASM_5007Component1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = Test_ASM_5007Component1 Reference = Reference1 +ASM_5008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50008] Component type reference not found for component reference: Component = TestComponent1 Reference = InvalidName +ASM_5009=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}] - [ASM50001] Duplicate component name: Composite = {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component = TestComponent1 +ASM_5010=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestComponent1 Service = Service1 +ASM_5014=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50009] Component reference multiplicity incompatible with reference multiplicity: Component = TestComponent1 Reference = Reference1 +ASM_5023=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite11] - [ASM50042] Composite reference promotes component reference with 1..1 multiplicity and nonOverridable flag set true: Composite = TestComposite11.composite Composite reference = Reference1 Component reference = Reference1 +ASM_5024=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Reference: Reference1] - [ASM50026] Composite {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component TestComponent1 Reference Reference1 must not specify endpoints using both target attribute and with a binding child element +ASM_5027=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Duplicate component property name: Component = TestComponent1 Property = serviceName +ASM_5028=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50031] Property not found for component property: Component = TestComponent1 Property = randomName +ASM_5029=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50032] The property component TestComponent1 property complexType has many values but its "many" attribute is set to false +ASM_5030=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_5030, Artifact: Test_ASM_5030.composite] - ASM50033: value attribute exists for the property element +ASM_5035=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - complexType +ASM_5036=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5036Component1] - [ASM_5036] The property component TEST_ASM_5036Component1 property complexType has XSD type {http://docs.oasis-open.org/ns/opencsa/scatests/200903}ComplexType2 while its component type property has the XSD type {http://docs.oasis-open.org/ns/opencsa/scatests/200903}ComplexType1 +ASM_5037=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5037Component1] - [ASM50031] Property not found for component property: Component = TEST_ASM_5037Component1 Property = bogusName +ASM_5038=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5038Component1] - [ASM50027] The property serviceData1 on component TEST_ASM_5038Component1 has a value which does not match the simple type {http://www.w3.org/2001/XMLSchema}float with which it is associated +ASM_5039=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5039Component1] - [ASM50038] The property complexType on component TEST_ASM_5039Component1 has a value which does not match the complex type {http://docs.oasis-open.org/ns/opencsa/scatests/200903}ComplexType1 with which it is associated. Validation reported cvc-complex-type.2.4.d: Invalid content was found starting with element 'test:thirdData'. No child element is expected at this point. +ASM_5040=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5040Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite74] - [ASM50042] Composite reference promotes component reference with 1..1 multiplicity and nonOverridable flag set true: Composite = TestComposite74.composite Composite reference = Reference1 Component reference = Reference1 +ASM_6001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_6001, Artifact: TestDuplicate***.composite] - [ASM_6001] More than one composite with the same name {http://docs.oasis-open.org/ns/opencsa/scatests/200903}DuplicateComposite found in contribution +ASM_6002=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40003,ASM60003,JCA90045] Duplicate implementation service name: Component = TestComponent1 Service = Service1 +ASM_6003=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite17] - [ASM60004,ASM60032] Promoted component service not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite17 Service = SpuriousComponent/SpuriousService +ASM_6005=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = TestComponent1 Reference = Reference1 +ASM_6006=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite20] - [ASM60007] Promoted component reference not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite20 Reference = Composite20Componentz/Reference1 +ASM_6008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6008Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite22] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. Operation operation2 not found on target +ASM_6012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6012TestComponent1] - [ASM40005,ASM60014] Duplicate implementation property name: Component = TEST_ASM_6012TestComponent1 Property = propertyName +ASM_6016=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite30, Component: TestComponent1, Reference: Reference1] - [ASM60028] No target services found for the component reference to be autowired: Reference1 +ASM_6020=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Reference: Reference1] - [ASM60028] No target services found for the component reference to be autowired: Reference1 +ASM_6021=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6021TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite31] - [ASM60004,ASM60032] Promoted component service not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite31 Service = Not_A_URI_of_a_Component +ASM_6022=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite32, Component: TestComponent1] - [ASM60033] No targets for reference: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite32 Reference = Reference1 +ASM_6023=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40011,ASM60034] No value configured on a mustSupply property: Component = TestComponent1 Property = simpleType +ASM_6024=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM60030,JCI50004,JCI80001] Component implementation not resolved: Component = TestComponent1 Uri = TestComponent1 +ASM_6025=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}] - [ASM50001] Duplicate component name: Composite = {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component = TestComponent1 +ASM_6028=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - InvalidProperty +ASM_6029=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: [ASM60041] Error: Composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_ASM_6029 can only include another composite with the identical @local attribute value +ASM_6030=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: [ASM60042] Error: Composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}Invalid_composite_name is not a valid composite within the domain +ASM_6031=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite39] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}suspendsTransaction and {http://docs.oasis-open.org/ns/opencsa/sca/200912}propagatesTransaction are mutually exclusive +ASM_6032=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite40] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}*** and {http://docs.oasis-open.org/ns/opencsa/sca/200912}*** are mutually exclusive +ASM_6033=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite41] - [ASM60011] Composite reference multiplicity incompatible with component reference multiplicity: Composite = TestComposite41.composite Composite reference = Reference1 Component reference = Reference1 +ASM_6036=Test service got an exception during execution: org.oasisopen.sca.ServiceRuntimeException Unable to bind [] - No endpoints found in the domain that match the reference (@***)EndpointReference: URI = TestClient#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (@***)Endpoint: URI = TEST_ASM_6036Component1#service(ServiceZ) [Unresolved] +ASM_6039=Test service got an exception during execution: org.oasisopen.sca.ServiceRuntimeException Unable to bind [] - No endpoints found in the domain that match the reference (@***)EndpointReference: URI = TestClient#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (@***)Endpoint: URI = TEST_ASM_6039Component1#service-binding(Service1/harry) [Unresolved] +ASM_8001=org.apache.tuscany.sca.interfacedef.OverloadedOperationException: [JCA20001] Cannot overload operation operation1 on org.oasisopen.sca.test.Service3 as it is a @Remotable interface +ASM_8004=org.apache.tuscany.sca.interfacedef.InvalidCallbackException: Callback org.oasisopen.sca.test.Service6Callback must be remotable on remotable interface org.oasisopen.sca.test.Service6 +ASM_8005=org.apache.tuscany.sca.interfacedef.InvalidCallbackException: Callbackorg.oasisopen.sca.test.Service7Callback must not be remotable on local interface org.oasisopen.sca.test.Service7 +ASM_8006=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_8006, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_ASM_8006] - The interface.wsdl element has a forward interface with a callback declared in the WSDL {http://test.sca.oasisopen.org/}Service9Callback and a callback interface also declared using the callbackInterface attribute {http://test.sca.oasisopen.org/}Service8Callback but the callback interfaces are not equal. +ASM_8007=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent2] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestComponent2 Service = Service1 +ASM_8008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [JCA30001,JCA30002,JCA30003,JCA90046] Component reference interface incompatible with implementation reference interface: Component = TestComponent1 Reference = Reference1 +ASM_8009=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8009Component1] - [JCA30001,JCA30002,JCA30003,JCA90046] Component reference interface incompatible with implementation reference interface: Component = TEST_ASM_8009Component1 Reference = Reference1 +ASM_8010=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8010Component2, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite63] - Interface of composite service Service1 must be subset of the interface declared by promoted component service. Callback operation not found on target +ASM_8011=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite62] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. Callback operation not found on target +ASM_8012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8012Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite64] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. +ASM_8014=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent2, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}Joe and {http://docs.oasis-open.org/ns/opencsa/sca/200912}confidentiality.transport are mutually exclusive +ASM_8017=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8017Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite72] - Interface of composite service Service1a must be subset of the interface declared by promoted component service. Callback interface doesn't match +ASM_8018=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestClient Service = TestInvocation +ASM_8019=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_8019, Artifact: Test_ASM_8019.composite] - The interface.wsdl interface {http://test.sca.oasisopen.org/}Service1 element can only have a remotable attribute with the value "true" as WSDL interface are assumed to be remotable by default. The value that was found is: false. +ASM_9002=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Multiple bindings with the same name for a service: Service = Service1 Binding name = Fred +ASM_9005=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_9005Component1] - [ASM90005] The SCA binding Service1 on component TEST_ASM_9005Component1 service Service1 should not have a URI and the URI is currently set to http://example/bar +ASM_10001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_10001, Artifact: META-INF/definitions.xml, Definitions: jar:file:***ASM_10001***.zip!/META-INF/definitions.xml] - [ASM10001,POL30002] Duplicate intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}Fred found in domain +ASM_10003=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_10003, Artifact: META-INF/definitions.xml, Definitions: jar:file:***ASM_10003***.zip!/META-INF/definitions.xml] - XMLSchema validation error occured in: ***/definitions.xml ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'component'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":intent, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySet, "http://docs.oasis-open.org/ns/opencsa/sca/200912":bindingType, "http://docs.oasis-open.org/ns/opencsa/sca/200912":implementationType, "http://docs.oasis-open.org/ns/opencsa/sca/200912":externalAttachment, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected. +ASM_12003=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Invalid interface when resolving +ASM_12007=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestComponent1 Service = Service1 Operation operation1 not found on target +ASM_12008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_12008TestComponent1] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TEST_ASM_12008TestComponent1 Service = Service1 Operation operation1 not found on target +ASM_12011=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM60030,JCI50004,JCI80001] Component implementation not resolved: Component = TestComponent1 Uri = TestComponent1 +ASM_12012=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_12012, Artifact: META-INF/sca-contribution.xml] - XMLSchema validation error occured in: jar:file:***ASM_12012***.zip!/META-INF/sca-contribution.xml ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'component'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":deployable, "http://docs.oasis-open.org/ns/opencsa/sca/200912":importBase, "http://docs.oasis-open.org/ns/opencsa/sca/200912":exportBase, "http://docs.oasis-open.org/ns/opencsa/sca/200912":extensions}' is expected. +ASM_13001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13001, Artifact: Test_ASM_13001.composite] - XMLSchema validation error occured in: Test_ASM_13001.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'sevrice'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":service, "http://docs.oasis-open.org/ns/opencsa/sca/200912":reference, "http://docs.oasis-open.org/ns/opencsa/sca/200912":property, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, "http://docs.oasis-open.org/ns/opencsa/sca/200912":extensions}' is expected. +ASM_13002=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13002, Artifact: Test_ASM_13002.composite] - XMLSchema validation error occured in: Test_ASM_13002.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'operation'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":binding, "http://docs.oasis-open.org/ns/opencsa/sca/200912":callback, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, "http://docs.oasis-open.org/ns/opencsa/sca/200912":extensions}' is expected. +ASM_13003=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13003, Artifact: Test_ASM_13003.composite] - XMLSchema validation error occured in: Test_ASM_13003.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'binding.ws'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":include, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, "http://docs.oasis-open.org/ns/opencsa/sca/200912":service, "http://docs.oasis-open.org/ns/opencsa/sca/200912":property, "http://docs.oasis-open.org/ns/opencsa/sca/200912":component, "http://docs.oasis-open.org/ns/opencsa/sca/200912":reference, "http://docs.oasis-open.org/ns/opencsa/sca/200912":wire, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected. +ASM_13004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestClient_0002, Component: TestClient_0002TestClient] - [ASM40011,ASM60034] No value configured on a mustSupply property +ASM_13005=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13005, Artifact: Test_ASM_13005.composite] - XMLSchema validation error occured in: Test_ASM_13005.composite ,line = ***, column = ***, Message = cvc-elt.2: The value of {abstract} in the element declaration for 'implementation' must be false. +ASM_13006=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13006, Artifact: Test_ASM_13006.composite] - XMLSchema validation error occured in: Test_ASM_13006.composite ,line = ***, column = ***, Message = cvc-complex-type.3.2.2: Attribute 'callback' is not allowed to appear in element 'interface.java'. +ASM_13007=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13007, Artifact: Test_ASM_13007.composite] - XMLSchema validation error occured in: Test_ASM_13007.composite ,line = ***, column = ***, Message = cvc-enumeration-valid: Value '2..2' is not facet-valid with respect to enumeration '[0..1, 1..1, 0..n, 1..n]'. It must be a value from the enumeration. +ASM_13008=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13008, Artifact: Test_ASM_13008.composite] - XMLSchema validation error occured in: Test_ASM_13008.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'operation'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":wireFormat, "http://docs.oasis-open.org/ns/opencsa/sca/200912":operationSelector, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment}' is expected. diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/pom.xml b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/pom.xml new file mode 100644 index 0000000000..0bb7ef04dd --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/pom.xml @@ -0,0 +1,128 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-compliance-tests + 2.0 + ../pom.xml + + tuscany-compliance-test-binding-jms + Apache Tuscany SCA Specification Compliance Tests Binding JMS + + + + + + + org.apache.tuscany.sca + tuscany-otests-sca-jms-tests + 2.0 + + + + org.apache.tuscany.sca + tuscany-base-runtime + 2.0 + pom + + + + org.apache.tuscany.sca + tuscany-binding-jms-runtime + 2.0 + + + + org.apache.activemq + activemq-all + 5.2.0 + + + + + org.codehaus.woodstox + wstx-asl + 3.2.9 + runtime + + + + junit + junit + 4.5 + test + + + + + + ${project.artifactId} + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Xms256m -Xmx1024m + + **/BJM_6017_1_TestCase.java + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + process-classes + + unpack + + + + + org.apache.tuscany.sca + oasis-jms-contributions + 2.0 + zip + ${project.build.directory}/oasis-contributions + + + org.apache.tuscany.sca + tuscany-otests-sca-jms-tests + 2.0 + jar + commons-logging.properties,oasis-sca-tests.properties,tuscany-oasis-sca-tests-errors.properties + ${project.build.directory}/test-classes + + + + + + + + + + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java new file mode 100644 index 0000000000..d9490c641e --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java @@ -0,0 +1,220 @@ +/* + * 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.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.Node; +import org.apache.tuscany.sca.node.NodeFactory; + +import testClient.TestException_Exception; +import client.RuntimeBridge; + +/** + * 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; + + 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 boolean startContribution(String compositeName, 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, contributionNames); + for (int i = 0; i < contributions.length; i++) { + contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]); + } // end for + + node = launcher.createNode(compositeName, 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, String[] contributionNames) throws Exception { + String[] locations = new String[contributionNames.length]; + + if (locations != null && contributionLocation != null) { + + for (int i = 0; i < locations.length; i++) { + String aLocation = contributionLocation.replaceAll("%1", contributionNames[i]); + + 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 void checkError(String testName, Throwable ex) throws Throwable { + + String expectedMessage = expectedErrorMessages.getProperty(testName); + String receivedMessage = getErrorMessage(ex);//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 expected 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) { + } + } + + protected String getErrorMessage(Throwable ex) { + String errorMessage = null; + + if (ex instanceof TestException_Exception) { + TestException_Exception te = (TestException_Exception) ex; + errorMessage = te.getFaultInfo().getMessage(); + } else { + errorMessage = ex.getMessage(); + } + + return errorMessage; + } +} // end class TuscanyRuntimeBridge diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/jndi.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/jndi.properties new file mode 100644 index 0000000000..cb9b1cdc4e --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/jndi.properties @@ -0,0 +1,119 @@ +# +# 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 JMS Binding JNDI properties + +# The JNDI naming provider URL and initial factory. Select values for your JMS provider. +java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false +#java.naming.provider.url = vm://localhost?brokerConfig=xbean:activemq.xml +java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory + +# Additional JNDI configuration, specific to the ActiveMQ JMS provider + +# Use the following property to specify the JNDI name the connection factory +# should appear as. +connectionFactoryNames = ConnectionFactory,TEST_BJM_3017_CF,TEST_BJM_3018_CF + +# Queue names used by JMS test cases +# Expressed in the form: +# queue.[jndiName] = [physicalName] +queue.TEST_BJM_3002_Queue = TEST_BJM_3002_Queue +queue.TEST_BJM_3003_Queue = TEST_BJM_3003_Queue +queue.TEST_BJM_3004_Queue = TEST_BJM_3004_Queue +queue.TEST_BJM_3005_Queue = TEST_BJM_3005_Queue +queue.TEST_BJM_3007_Receive_Queue = TEST_BJM_3007_Receive_Queue +queue.TEST_BJM_3007_Service_Queue = TEST_BJM_3007_Service_Queue +queue.TEST_BJM_3011_Queue = +# queue.TEST_BJM_3012_Queue = TEST_BJM_3012_Queue +# queue.TEST_BJM_3014_Queue = TEST_BJM_3014_Queue +queue.TEST_BJM_3015_Queue = TEST_BJM_3015_Queue +queue.TEST_BJM_3019_Queue = TEST_BJM_3019_Queue +queue.TEST_BJM_3020_Queue = TEST_BJM_3020_Queue +queue.TEST_BJM_3021_Queue = TEST_BJM_3021_Queue +queue.TEST_BJM_3022_Queue = TEST_BJM_3022_Queue +queue.TEST_BJM_3023_Queue = TEST_BJM_3023_Queue +queue.TEST_BJM_3024_Queue = TEST_BJM_3024_Queue +queue.TEST_BJM_3024_REF_Queue = TEST_BJM_3024_REF_Queue +queue.TEST_BJM_3025_Queue = TEST_BJM_3025_Queue +queue.TEST_BJM_3025_REF_Queue = TEST_BJM_3025_REF_Queue +queue.TEST_BJM_3026_Queue = TEST_BJM_3026_Queue +queue.TEST_BJM_3029_Queue = TEST_BJM_3029_Queue +queue.TEST_BJM_3031_Queue = TEST_BJM_3031_Queue +queue.TEST_BJM_3034_Queue = TEST_BJM_3034_Queue +queue.TEST_BJM_4001_Queue = TEST_BJM_4001_Queue +queue.TEST_BJM_4002_Queue = TEST_BJM_4002_Queue +queue.TEST_BJM_4003_Queue = TEST_BJM_4003_Queue +queue.TEST_BJM_4003_Service_Queue = TEST_BJM_4003_Service_Queue +queue.TEST_BJM_4004_Queue = TEST_BJM_4004_Queue +queue.TEST_BJM_4005_Queue = TEST_BJM_4005_Queue +queue.TEST_BJM_4006_Service_Queue = TEST_BJM_4006_Service_Queue +queue.TEST_BJM_4006_Reference_Queue = TEST_BJM_4006_Reference_Queue +queue.TEST_BJM_4008_Queue = TEST_BJM_4008_Queue +queue.TEST_BJM_4009_Queue = TEST_BJM_4009_Queue +queue.TEST_BJM_4010_Queue = TEST_BJM_4010_Queue +queue.TEST_BJM_4011_Queue = TEST_BJM_4011_Queue +queue.TEST_BJM_5001_Queue = TEST_BJM_5001_Queue +queue.TEST_BJM_5002_Queue = TEST_BJM_5002_Queue +queue.TEST_BJM_6001_Service_Queue = TEST_BJM_6001_Service_Queue +queue.TEST_BJM_6001_Reference_Queue = TEST_BJM_6001_Reference_Queue +queue.TEST_BJM_6002_Service_Queue = TEST_BJM_6002_Service_Queue +queue.TEST_BJM_6002_Reference_Queue = TEST_BJM_6002_Reference_Queue +queue.TEST_BJM_6003_Receive_Queue = TEST_BJM_6003_Receive_Queue +queue.TEST_BJM_6003_Response_Queue = TEST_BJM_6003_Response_Queue +queue.TEST_BJM_6003_Service_Queue = TEST_BJM_6003_Service_Queue +queue.TEST_BJM_6004_Receive_Queue = TEST_BJM_6004_Receive_Queue +queue.TEST_BJM_6004_Send_Queue = TEST_BJM_6004_Send_Queue +queue.TEST_BJM_6004_Response_Queue = TEST_BJM_6004_Response_Queue +queue.TEST_BJM_6005_Receive_Queue = TEST_BJM_6005_Receive_Queue +queue.TEST_BJM_6005_Send_Queue = TEST_BJM_6005_Send_Queue +queue.TEST_BJM_6006_Send_Queue = TEST_BJM_6006_Send_Queue +queue.TEST_BJM_6007_Queue = TEST_BJM_6007_Queue +queue.TEST_BJM_6007_Receive_Queue = TEST_BJM_6007_Receive_Queue +queue.TEST_BJM_6008_Queue = TEST_BJM_6008_Queue +queue.TEST_BJM_6008_Receive_Queue = TEST_BJM_6008_Receive_Queue +queue.TEST_BJM_6009_Queue = TEST_BJM_6009_Queue +queue.TEST_BJM_6010_Queue = TEST_BJM_6010_Queue +queue.TEST_BJM_6011_Service_Queue = TEST_BJM_6011_Service_Queue +queue.TEST_BJM_6011_Reference_Queue = TEST_BJM_6011_Reference_Queue +queue.TEST_BJM_6011_Callback_Queue = TEST_BJM_6011_Callback_Queue +queue.TEST_BJM_6012_Service_Queue = TEST_BJM_6012_Service_Queue +queue.TEST_BJM_6012_Reference_Queue = TEST_BJM_6012_Reference_Queue +queue.TEST_BJM_6012_Callback_Queue = TEST_BJM_6012_Callback_Queue +queue.TEST_BJM_6013_Service_Queue = TEST_BJM_6013_Service_Queue +queue.TEST_BJM_6013_Reference_Queue = TEST_BJM_6013_Reference_Queue +queue.TEST_BJM_6013_Response_Queue = TEST_BJM_6013_Response_Queue +queue.TEST_BJM_6013_Callback_Queue = TEST_BJM_6013_Callback_Queue +queue.TEST_BJM_6014_Service_Queue = TEST_BJM_6014_Service_Queue +queue.TEST_BJM_6014_Reference_Queue = TEST_BJM_6014_Reference_Queue +queue.TEST_BJM_6014_Callback_Queue = TEST_BJM_6014_Callback_Queue +queue.TEST_BJM_6015_Service_Queue = TEST_BJM_6015_Service_Queue +queue.TEST_BJM_6015_CB_Binding_Queue = TEST_BJM_6015_CB_Binding_Queue +queue.TEST_BJM_6015_SCD_Prop_Queue = TEST_BJM_6015_SCD_Prop_Queue +queue.TEST_BJM_6015_CB_ReplyTo_Queue = TEST_BJM_6015_CB_ReplyTo_Queue +queue.TEST_BJM_6016_Service_Queue = TEST_BJM_6016_Service_Queue +queue.TEST_BJM_6016_Reply_Queue = TEST_BJM_6016_Reply_Queue +queue.TEST_BJM_6017_Service_Queue = TEST_BJM_6017_Service_Queue +queue.TEST_BJM_6017_CB_Binding_Queue = TEST_BJM_6017_CB_Binding_Queue + +queue.Service1 = Service1_Queue +queue.AlreadyExists = AlreadyExists_Queue + +# Topic names used by JMS test cases +# Expressed in the form: +# topic.[jndiName] = [physicalName] +topic.TEST_BJM_3014_Topic = TEST_BJM_3014_Topic +topic.TEST_BJM_3015_Topic = TEST_BJM_3015_Topic \ No newline at end of file diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/oasis-sca-tests.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/oasis-sca-tests.properties new file mode 100644 index 0000000000..dc3296ae8c --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/oasis-sca-tests.properties @@ -0,0 +1,30 @@ +# 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/target/%1.zip + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/tuscany-oasis-sca-tests-errors.properties new file mode 100644 index 0000000000..a743483ddb --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-jms/src/test/resources/tuscany-oasis-sca-tests-errors.properties @@ -0,0 +1,49 @@ +# Copyright(C) OASIS(R) 2010. All Rights Reserved. +# OASIS trademark, IPR and other policies apply. +# +# Detailed Tuscany error messages for SCA JMS Binding testcases, where the testcase causes an +# exception either in initialization or at runtime +# +BJM_3001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3001, Artifact: Test_BJM_3001.composite] - URI must start with the scheme 'jms:jndi:' or 'jms:queue:' or 'jms:topic:' for uri: http://test.sca.oasisopen.org/ +BJM_3002_1=Test service got an exception during execution: org.apache.tuscany.sca.binding.jms.JMSBindingException JMS Destination DOES_NOT_EXIST_Queue not found but create mode of "never" while registering binding Reference1 invoker +BJM_3002_2=Test service got an exception during execution: org.apache.tuscany.sca.binding.jms.JMSBindingException org.apache.tuscany.sca.binding.jms.JMSBindingException: org.apache.tuscany.sca.binding.jms.JMSBindingException: connection factory not found: DOES_NOT_EXIST +BJM_3011=org.apache.tuscany.sca.binding.jms.JMSBindingException: JMS Destination TEST_BJM_3011_Queue already exists but has create mode of "always" while registering service Service1 listener +BJM_3011A=org.apache.tuscany.sca.binding.jms.JMSBindingException: Incorrect resource type for ActivationSpec: org.apache.activemq.command.ActiveMQQueue +BJM_3011C=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3011C, Artifact: Test_BJM_3011C.composite] - When connection factory "AlreadyExists" element is present then a destination name must also be defined +BJM_3011D=org.apache.tuscany.sca.binding.jms.JMSBindingException: JMS Destination AlreadyExists already exists but has create mode of "always" while registering service Service1 listener +BJM_3012A=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3012A, Artifact: Test_BJM_3012A.composite] - Must specify jndiName attribute when create mode is ''ifNotExist'' +BJM_3012C=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3012C, Artifact: Test_BJM_3012C.composite] - Missing ConnectionFactory Name +BJM_3012D=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3012D, Artifact: Test_BJM_3012D.composite] - Must specify jndiName attribute when create mode is ''ifNotExist'' +BJM_3013A=org.apache.tuscany.sca.binding.jms.JMSBindingException: Can not create ActivationSpec +BJM_3013C=org.apache.tuscany.sca.binding.jms.JMSBindingException: connection factory not found: TEST_BJM_3013_CF +BJM_3013D=org.apache.tuscany.sca.binding.jms.JMSBindingException: JMS Destination TEST_BJM_3013_Queue not found with create mode of "ifNotExist" while registering service Service1 listener +BJM_3014=org.apache.tuscany.sca.binding.jms.JMSBindingException: JMS Destination TEST_BJM_3014_Queue expecting type of queue but found topic while registering service Service1 listener +BJM_3014A=org.apache.tuscany.sca.binding.jms.JMSBindingException: Incorrect resource type for ActivationSpec: org.apache.activemq.command.ActiveMQTopic +BJM_3014C=org.apache.tuscany.sca.binding.jms.JMSBindingException: JNDI resource 'TEST_BJM_3014_Topic' is not a JMS ConnectionFactory +BJM_3014D=org.apache.tuscany.sca.binding.jms.JMSBindingException: JMS Destination TEST_BJM_3014_Topic expecting type of queue but found topic while registering service Service1 listener +BJM_3015Aa=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3015Aa, Artifact: Test_BJM_3015Aa.composite] - Must specify jndiName attribute when create mode is ''never'' +BJM_3015Ab=org.apache.tuscany.sca.binding.jms.JMSBindingException: ActivationSpec specifies create mode of "never" but resource does not exist at jndiName DoesntExist +BJM_3015Ac=org.apache.tuscany.sca.binding.jms.JMSBindingException: Incorrect resource type for ActivationSpec: org.apache.activemq.command.ActiveMQQueue +BJM_3015Ca=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3015Ca, Artifact: Test_BJM_3015Ca.composite] - Missing ConnectionFactory Name +BJM_3015Cb=org.apache.tuscany.sca.binding.jms.JMSBindingException: connection factory not found: DoesntExist +BJM_3015Cc=org.apache.tuscany.sca.binding.jms.JMSBindingException: JNDI resource 'TEST_BJM_3015_Queue' is not a JMS ConnectionFactory +BJM_3015Da=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3015Da, Artifact: Test_BJM_3015Da.composite] - Must specify jndiName attribute when create mode is ''never'' +BJM_3015Db=org.apache.tuscany.sca.binding.jms.JMSBindingException: JMS Destination DoesntExist not found but create mode of "never" while registering service Service1 listener +BJM_3015Dc=org.apache.tuscany.sca.binding.jms.JMSBindingException: JMS Destination TEST_BJM_3015_Topic expecting type of queue but found topic while registering service Service1 listener +BJM_3017=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3017, Artifact: Test_BJM_3017.composite] - XMLSchema validation error occured in: Test_BJM_3017.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'activationSpec'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":response, "http://docs.oasis-open.org/ns/opencsa/sca/200912":headers, "http://docs.oasis-open.org/ns/opencsa/sca/200912":messageSelection, "http://docs.oasis-open.org/ns/opencsa/sca/200912":resourceAdapter, "http://docs.oasis-open.org/ns/opencsa/sca/200912":operationProperties, "http://docs.oasis-open.org/ns/opencsa/sca/200912":extensions}' is expected. +BJM_3018=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3018, Artifact: Test_BJM_3018.composite] - When connection factory "TEST_BJM_3018_CF" element is present then a destination name must also be defined +BJM_3019=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3019, Artifact: Test_BJM_3019.composite] - Activation spec name TEST_BJM_3019_AS must match destination name TEST_BJM_3019_Queue_XXX +BJM_3020=Test service got an exception during execution: org.apache.tuscany.sca.binding.jms.JMSBindingException Activation spec can not be specified on an SCA reference binding +BJM_3021=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3021, Artifact: Test_BJM_3021.composite] - XMLSchema validation error occured in: Test_BJM_3021.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.d: Invalid content was found starting with element 'activationSpec'. No child element is expected at this point. +BJM_3022=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3022, Artifact: Test_BJM_3022.composite] - Activation spec name TEST_BJM_3022_Response_AS must match destination name TEST_BJM_3022_Response_Queue +BJM_3023=org.apache.tuscany.sca.runtime.ActivationException: org.apache.tuscany.sca.runtime.ActivationException: org.apache.tuscany.sca.binding.jms.JMSBindingException: [BJM30023] response/activationSpec element MUST NOT be present when the binding is being used for an SCA service +BJM_3029=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3029, Artifact: Test_BJM_3029.composite] - the selectedOperation attribute MUST be unique across the containing binding.jms element +BJM_3034=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3034, Artifact: Test_BJM_3034.composite] - Destination TEST_BJM_3034_Queue can not be specified when URI jms:jndi:TEST_BJM_3034_Queue is present +BJM_3036=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3036, Artifact: Test_BJM_3036.composite] - XMLSchema validation error occured in: Test_BJM_3036.composite ,line = ***, column = ***, Message = cvc-complex-type.3.2.2: Attribute 'invalidAttribute' is not allowed to appear in element 'binding.jms' +BJM_3037A=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3037A, Artifact: Test_BJM_3037A.composite] - A JNDI name must be specified when an ActivationSpec has a create mode of "always" +BJM_3037C=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BJM_3037C, Artifact: Test_BJM_3037C.composite] - Missing ConnectionFactory Name +BJM_3037D=org.apache.tuscany.sca.binding.jms.JMSBindingException: JMS Destination Service1 already exists but has create mode of "always" while registering service Service1 listener +BJM_4004=Message = org.apache.tuscany.sca.binding.jms.JMSBindingException: java.io.IOException: org.xml.sax.SAXParseException***Content is not allowed in prolog +BJM_4011=Message = org.apache.tuscany.sca.binding.jms.JMSBindingException: Cannot determine service operation +BJM_6016=Message = org.apache.tuscany.sca.binding.jms.JMSBindingException: No destination specified for reference Service4 + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/pom.xml b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/pom.xml new file mode 100644 index 0000000000..ce2fc45c3d --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/pom.xml @@ -0,0 +1,125 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-compliance-tests + 2.0 + ../pom.xml + + tuscany-compliance-test-binding-ws + Apache Tuscany SCA Specification Compliance Tests Binding WS + + + + + + + + + org.apache.tuscany.sca + tuscany-base-runtime + 2.0 + + + + org.apache.tuscany.sca + tuscany-binding-ws-runtime-axis2 + 2.0 + + + + org.codehaus.woodstox + wstx-asl + 3.2.9 + runtime + + + + org.mortbay.jetty + jetty + 6.1.19 + test + + + + junit + junit + 4.5 + test + + + + + + ${project.artifactId} + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Xms256m -Xmx1024m + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + process-classes + + unpack + + + + + org.apache.tuscany.sca + oasis-ws-contributions + 2.0 + zip + ${project.build.directory}/oasis-contributions + + + org.apache.tuscany.sca + tuscany-otests-sca-ws-tests + 2.0 + jar + commons-logging.properties,oasis-sca-tests.properties + ${project.build.directory}/test-classes + + + + + + + + + + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/sca_variables.dtd b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/sca_variables.dtd new file mode 100644 index 0000000000..f29713a20d --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/sca_variables.dtd @@ -0,0 +1,28 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java new file mode 100644 index 0000000000..139e8b31fd --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java @@ -0,0 +1,217 @@ +/* + * 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.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.Node; +import org.apache.tuscany.sca.node.NodeFactory; + +import testClient.TestException_Exception; +import client.RuntimeBridge; + +/** + * 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; + + 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 boolean startContribution(String compositeName, String contributionLocation, String[] contributionNames) throws Exception { + try { + // Tuscany specific code which starts the contribution(s) holding the test + launcher = NodeFactory.newInstance(); + + Contribution[] contributions = new Contribution[contributionNames.length]; + String[] contributionURIs = getContributionURIs(contributionLocation, contributionNames); + for (int i = 0; i < contributions.length; i++) { + contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]); + } // end for + + node = launcher.createNode(compositeName, 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, String[] contributionNames) throws Exception { + String[] locations = new String[contributionNames.length]; + + if (locations != null && contributionLocation != null) { + + for (int i = 0; i < locations.length; i++) { + String aLocation = contributionLocation.replaceAll("%1", contributionNames[i]); + + 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 void checkError(String testName, Throwable ex) throws Throwable { + + String expectedMessage = expectedErrorMessages.getProperty(testName); + String receivedMessage = getErrorMessage(ex);//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 expected 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) { + } + } + + protected String getErrorMessage(Throwable ex) { + String errorMessage = null; + + if (ex instanceof TestException_Exception) { + TestException_Exception te = (TestException_Exception) ex; + errorMessage = te.getFaultInfo().getMessage(); + } else { + errorMessage = ex.getMessage(); + } + + return errorMessage; + } +} // end class TuscanyRuntimeBridge diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/resources/oasis-sca-tests.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/resources/oasis-sca-tests.properties new file mode 100644 index 0000000000..dc3296ae8c --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/resources/oasis-sca-tests.properties @@ -0,0 +1,30 @@ +# 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/target/%1.zip + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/resources/tuscany-oasis-sca-tests-errors.properties new file mode 100644 index 0000000000..61d55f8548 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/binding-ws/src/test/resources/tuscany-oasis-sca-tests-errors.properties @@ -0,0 +1,33 @@ +# 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_2001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2001, Artifact: Test_BWS_2001.composite] - [BWS20001] The URI value for binding.ws on an SCA reference must be absolute. Non-absolute value found /TEST_BWS_2001Component2/Service1 +BWS_2002=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2002, Artifact: Test_BWS_2002.composite] - Invalid WebService binding wsdlElement attribute: http://test.sca.oasisopen.org/#wsdl.port(NonExistentPortName) +BWS_2003=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2003, Artifact: Test_BWS_2003.composite] - [BWS20003] The wsdlElement attribute of a binding.ws on an SCA service must not specify the wsdl.service form of URI. The following URI was found http://test.sca.oasisopen.org/#wsdl.service(Service1Service) +BWS_2005=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2005, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_BWS_2005] - [BWS20005][BWS20010] The WSDL binding transport http://example.com/foo/bar is not supported by Tuscany +BWS_2007=org.apache.tuscany.sca.runtime.ActivationException: org.apache.tuscany.sca.runtime.ActivationException: org.oasisopen.sca.ServiceRuntimeException: Component TEST_BWS_2007Component2 Service Service1 interface is incompatible with the interface of the service binding - Service1 - Operations called operation1 are not compatible Operation argument types source = {http://www.w3.org/2001/XMLSchema}float target = {http://www.w3.org/2001/XMLSchema}string don't match for output types|||Operations called operation1 are not compatible||| - [(***)Endpoint: URI = TEST_BWS_2007Component2#service-binding(Service1/Service1)] +BWS_2011=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2011, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_BWS_2011] - [BWS20005][BWS20010] The WSDL binding transport http://example.com/foo/bar is not supported by Tuscany +BWS_2013=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2013, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_BWS_2013] - [BWS20005][BWS20010] The WSDL binding transport http://example.com/foo/bar is not supported by Tuscany +BWS_2015=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2015, Artifact: Test_BWS_2015.composite] - [BWS20017] binding.ws has a @wsdli:wsdlLocation attribute but no @wsdlElement attribute +BWS_2016=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2016, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_BWS_2016] - Exception locating wsdli:location resource: org.apache.tuscany.sca.contribution.processor.ContributionReadException: +BWS_2017=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2017, Artifact: Test_BWS_2017.composite] - [BWS20019] with binding.ws you can only specify one of url, wsa:EndpointReference, #wsdl.service or #wsdl.port. The following were found [uri, wsa:EndpointReference] +BWS_2018=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2018, Artifact: Test_BWS_2018.composite] - [BWS20020] For the callback element of an SCA service, the binding must not specify an endpoint address URI or a WS-Addressing wsa:EndpointReference +BWS_2019=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2019, Artifact: Test_BWS_2019.composite] - XMLSchema validation error occured in: Test_BWS_2019.composite ,line = 36, column = 10, Message = cvc-complex-type.3.2.2: Attribute 'invalidAttribute' is not allowed to appear in element 'binding.ws'. +BWS_2020=org.oasisopen.sca.ServiceRuntimeException [BWS20025] Unable to determine destination endpoint for endpoint reference (***)EndpointReference: URI = TEST_BWS_2020Component1#reference-binding(reference1/Reference1) RESOLVED_BINDING Target = (***)Endpoint: +BWS_2022=org.apache.tuscany.sca.runtime.ActivationException: org.apache.tuscany.sca.runtime.ActivationException: org.apache.tuscany.sca.runtime.ActivationException: org.apache.tuscany.sca.runtime.ActivationException: org.oasisopen.sca.ServiceRuntimeException: Component TEST_BWS_2022Component1 Reference reference1 interface is incompatible with the interface of the reference binding Reference1 - Callback interface doesn't match as one of the callback interfaces is null - [(***)EndpointReference: URI = TEST_BWS_2022Component1#reference-binding(reference1/Reference1) RESOLVED_BINDING Target = (***)Endpoint: ] +BWS_4008=org.apache.tuscany.sca.runtime.ActivationException: org.apache.tuscany.sca.runtime.ActivationException: org.apache.tuscany.sca.runtime.ActivationException: org.apache.tuscany.sca.runtime.ActivationException: org.oasisopen.sca.ServiceRuntimeException: rpc/encoded WSDL style not supported. Component TEST_BWS_4008Component1 Reference reference1 Binding Reference1 +BWS_5003=A header representing a Message Addressing Property is not valid and the message cannot be processed \ No newline at end of file diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/pom.xml b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/pom.xml new file mode 100644 index 0000000000..d0aa1499a0 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/pom.xml @@ -0,0 +1,131 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-compliance-tests + 2.0 + ../pom.xml + + tuscany-compliance-test-java-caa + Apache Tuscany SCA Specification Compliance Tests Java CAA + + + + + + + + + org.apache.tuscany.sca + tuscany-base-runtime + 2.0 + + + + org.apache.tuscany.sca + tuscany-binding-ws-runtime-axis2 + 2.0 + + + + org.mortbay.jetty + jetty + 6.1.19 + test + + + + junit + junit + 4.5 + test + + + + log4j + log4j + 1.2.16 + test + + + + + + + + ${project.artifactId} + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Xms256m -Xmx1024m + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + process-classes + + unpack + + + + + org.apache.tuscany.sca + oasis-javacaa-contributions + 2.0 + zip + ${project.build.directory}/oasis-contributions + + + org.apache.tuscany.sca + tuscany-otests-sca-j-caa-tests + 2.0 + jar + commons-logging.properties,oasis-sca-tests.properties,tuscany-oasis-sca-tests-errors.properties + ${project.build.directory}/test-classes + + + + + + + + + + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java new file mode 100644 index 0000000000..db16f85c37 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java @@ -0,0 +1,224 @@ +/* + * 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.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.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.apache.tuscany.sca.node.configuration.NodeConfiguration; +import org.apache.tuscany.sca.node.impl.NodeImpl; + +import testClient.TestException_Exception; +import client.RuntimeBridge; + +/** + * 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; + + 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 boolean startContribution(String compositeName, String contributionLocation, String[] contributionNames) throws Exception { + try { + // Tuscany specific code which starts the contribution(s) holding the test + launcher = NodeFactory.newInstance(); + + Contribution[] contributions = new Contribution[contributionNames.length]; + String[] contributionURIs = getContributionURIs(contributionLocation, contributionNames); + for (int i = 0; i < contributions.length; i++) { + contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]); + } // end for + + node = launcher.createNode(compositeName, contributions); + + // Set the domain URI for the node as JCA_9016 tests for this domain name + NodeConfiguration nodeConfiguration = ((NodeImpl)node).getConfiguration(); + nodeConfiguration.setDomainURI("http://Domain1"); + + // 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, String[] contributionNames) throws Exception { + String[] locations = new String[contributionNames.length]; + + if (locations != null && contributionLocation != null) { + + for (int i = 0; i < locations.length; i++) { + String aLocation = contributionLocation.replaceAll("%1", contributionNames[i]); + + 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 void checkError(String testName, Throwable ex) throws Throwable { + + String expectedMessage = expectedErrorMessages.getProperty(testName); + String receivedMessage = getErrorMessage(ex);//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 expected 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) { + } + } + + protected String getErrorMessage(Throwable ex) { + String errorMessage = null; + + if (ex instanceof TestException_Exception) { + TestException_Exception te = (TestException_Exception) ex; + errorMessage = te.getFaultInfo().getMessage(); + } else { + errorMessage = ex.getMessage(); + } + + return errorMessage; + } +} // end class TuscanyRuntimeBridge diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/resources/oasis-sca-tests.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/resources/oasis-sca-tests.properties new file mode 100644 index 0000000000..b22464391d --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/resources/oasis-sca-tests.properties @@ -0,0 +1,30 @@ +# 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=POJO + +# 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/target/%1.zip + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/resources/tuscany-oasis-sca-tests-errors.properties new file mode 100644 index 0000000000..78e2cffa02 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-caa/src/test/resources/tuscany-oasis-sca-tests-errors.properties @@ -0,0 +1,80 @@ +# 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. +# +# Detailed Tuscany error messages for Java CAA testcases, where the testcase causes an +# exception either in initialization or at runtime +# +JCA_1001=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: org.apache.tuscany.sca.interfacedef.InvalidCallbackException: Callback org.oasisopen.sca.test.ServiceRemoteLocalCallback must be remotable on remotable interface org.oasisopen.sca.test.ServiceRemoteLocal +JCA_1002=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: org.apache.tuscany.sca.interfacedef.InvalidCallbackException: Callbackorg.oasisopen.sca.test.ServiceLocalRemoteCallback must not be remotable on local interface org.oasisopen.sca.test.ServiceLocalRemote +JCA_2001=org.apache.tuscany.sca.interfacedef.OverloadedOperationException: [JCA20001] Cannot overload operation operation1 on org.oasisopen.sca.test.Service1Overload as it is a @Remotable interface +JCA_3001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: JCA_3001, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_3001] - Class Not Found Exception: Service1 +JCA_3002=org.oasisopen.sca.ServiceRuntimeException: [Contribution: JCA_3002, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_3002] - Class Not Found Exception: Service1 +JCA_3003=org.oasisopen.sca.ServiceRuntimeException: [Contribution: JCA_3003, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_3003] - Class Not Found Exception: Service3Callback +JCA_3004=org.oasisopen.sca.ServiceRuntimeException: [Contribution: JCA_3004, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_3004] - Class Not Found Exception: Service3Callback +JCA_3006=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_3006Component2] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TEST_JCA_3006Component2 Service = Service3WithCallback Callback operation not found on target +JCA_3007=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_3007Component1] - [JCA30001,JCA30002,JCA30003,JCA90046] Component reference interface incompatible with implementation reference interface: Component = TEST_JCA_3007Component1 Reference = reference1 +JCA_3008=org.oasisopen.sca.ServiceRuntimeException: [Contribution: JCA_3008, Artifact: Test_JCA_3008.composite] - XMLSchema validation error occured in: Test_JCA_3008.composite ,line = ***, column = ***, Message = cvc-complex-type.3.2.2: Attribute 'oops' is not allowed to appear in element 'interface.java'. +JCA_3009=org.apache.tuscany.sca.interfacedef.InvalidAnnotationException: [JCA30005] @Remotable annotation present in a interface marked as not remotable in the SCDL +JCA_3011=org.oasisopen.sca.ServiceRuntimeException: [Contribution: JCA_3011, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_3011] - [JCA30006] Forbidden annotation interface org.oasisopen.sca.annotation.Property found on service interface in class org.oasisopen.sca.test.JCA3011Service +JCA_3012=org.oasisopen.sca.ServiceRuntimeException: [Contribution: JCA_3012, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_3012] - [JCA30007] Forbidden annotation interface org.oasisopen.sca.annotation.Property found on callback interface in class org.oasisopen.sca.test.JCA3012Service3Callback +JCA_3013=Test service got an exception during execution: org.oasisopen.sca.ServiceRuntimeException Unable to bind [] - Unable to match the endpoint reference (***)EndpointReference: URI = TEST_JCA_3013Component1#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_3013Component2#service(ServiceOneWay) [Unresolved] with the policy of the service to which it refers, matching process was Match policy of (***)EndpointReference: URI = TEST_JCA_3013Component1#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_3013Component2#service(ServiceOneWay) [Unresolved] to (***)Endpoint: URI = TEST_JCA_3013Component2#service-binding(ServiceOneWay/ServiceOneWay) Match because there are no intents or policies |||Match interface of (***)EndpointReference: URI = TEST_JCA_3013Component1#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_3013Component2#service(ServiceOneWay) [Unresolved] to (***)Endpoint: URI = TEST_JCA_3013Component2#service-binding(ServiceOneWay/ServiceOneWay) operations one-way not the same, source = false target = true|||Operations called inonly1 are not compatible|||Match failed because the interface contract mapper failed ||| +JCA_3014=Test service got an exception during execution: org.oasisopen.sca.ServiceRuntimeException Unable to bind [] - Unable to match the endpoint reference (***)EndpointReference: URI = TEST_JCA_3014Component1#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_3014Component2#service(Service3OperationsWSDL) [Unresolved] with the policy of the service to which it refers, matching process was Match policy of (***)EndpointReference: URI = TEST_JCA_3014Component1#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_3014Component2#service(Service3OperationsWSDL) [Unresolved] to (***)Endpoint: URI = TEST_JCA_3014Component2#service-binding(Service3OperationsWSDL/Service3OperationsWSDL) Match because there are no intents or policies |||Match interface of (***)EndpointReference: URI = TEST_JCA_3014Component1#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_3014Component2#service(Service3OperationsWSDL) [Unresolved] to (***)Endpoint: URI = TEST_JCA_3014Component2#service-binding(Service3OperationsWSDL/Service3OperationsWSDL) Operation operation3 not found on target|||Match failed because the interface contract mapper failed ||| +JCA_7004=Test service got an exception during execution: org.oasisopen.sca.ServiceRuntimeException Unable to bind [] - Unable to match the endpoint reference (***)EndpointReference: URI = TestClient#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_7004Component1#service(Service1AsyncServerError) [Unresolved] with the policy of the service to which it refers, matching process was Match policy of (***)EndpointReference: URI = TestClient#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_7004Component1#service(Service1AsyncServerError) [Unresolved] to (***)Endpoint: URI = TEST_JCA_7004Component1#service-binding(Service1AsyncServerError/Service1AsyncServerError) Match because there are no intents or policies |||Match interface of (***)EndpointReference: URI = TestClient#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_7004Component1#service(Service1AsyncServerError) [Unresolved] to (***)Endpoint: URI = TEST_JCA_7004Component1#service-binding(Service1AsyncServerError/Service1AsyncServerError) Operation operation1 not found on target|||Match failed because the interface contract mapper failed ||| +JCA_10001=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.IllegalPropertyException: [JCA90001] Argument 1 of method operation1 in class class org.oasisopen.sca.test.service1BadAnnotation can not be a Property +JCA_10002=org.oasisopen.sca.ServiceRuntimeException: [Contribution: JCA_10002, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_10002] - [JCA9002] SCA annotations are not permitted on static members: org.oasisopen.sca.test.service1Sta +JCA_10003=org.oasisopen.sca.ServiceRuntimeException: [Contribution: JCA_10003, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_10003] - [JCA9002] SCA annotations are not permitted on static members: org.oasisopen.sca.test.service1Sta +JCA_10004=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.IllegalCallbackReferenceException: [JCA90046] @Callback on field of method must not have any parameters +JCA_10006=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.InvalidConstructorException: JCA90003 constructor parameters for class org.oasisopen.sca.test.service1BadConstrImpl must have @Property or @Reference annotation +JCA_10007=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.IllegalDestructorException: [JCA90004] Destructor must not have arguments +JCA_10008=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.IllegalInitException: [JCA90008] Initializer must not have argments +JCA_10009=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.IllegalPropertyException: [JCA90011] Final field serviceName in class org.oasisopen.sca.test.service1BadPropImpl can not be annotated as a Property +JCA_10010=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.InvalidPropertyException: [JCA90013] Missing property name: public org.oasisopen.sca.test.service1ConstrBadPropImpl(java.lang.String)[0] +JCA_10011=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.InvalidPropertyException: [JCA90014] Constructor property must not have required=false: org.oasisopen.sca.test.service1ConstrBadPropImpl +JCA_10013=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_10013Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent6.qual2 and {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent6.qual1 are mutually exclusive +JCA_10014=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.InvalidReferenceException: [JCA90018] @Reference in a Constructor must have a name attributeorg.oasisopen.sca.test.service1ConstrBad +JCA_10015=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.InvalidReference +JCA_10029=org.apache.tuscany.sca.interfacedef.InvalidAnnotationException: [JCA90053] @Remotable annotation present on an interface method which is not a Setter method: org.oasisopen.sca.test.ServiceBadRemotableMethod/operation2 +JCA_10030=org.apache.tuscany.sca.interfacedef.InvalidAnnotationException: [JCA90053] @Remotable annotation present on an interface method parameter: org.oasisopen.sca.test.ServiceBadRemotable/operation2 +JCA_10031=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.IllegalCallbackReferenceException: Callback type does not match a service callback interface: org.oasisopen.sca.test.service3ImplBad +JCA_10032=org.apache.tuscany.sca.interfacedef.InvalidOperationException: Method should return 'void' when declared with an @OneWay annotation. public abstract java.lang.String org.oasisopen.sca.test.ServiceOneWayNoVoid.operation2(java.lang.String) +JCA_10033=org.apache.tuscany.sca.interfacedef.InvalidOperationException: Method should not declare exceptions with an @OneWay annotation. public abstract void org.oasisopen.sca.test.ServiceOneWayThrows.operation2(java.lang.String) throws org.oasisopen.sca.test.TestException +JCA_10035=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.IllegalCallbackReferenceException: [JCA90057] @Callback on field or method cannot be used for a class with @Scope(COMPOSITE): org.oasisopen.sca.test.service3ImplComposite.callback +JCA_10046=org.oasisopen.sca.ServiceRuntimeException: [] - [JCA90040] Exception while generating WSDL for TEST_JCA_10046Component1/Unmappable exception was: ***.IllegalAnnotationsException: 4 counts of IllegalAnnotationExceptions +JCA_10047=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: [JCA90041] @Scope annotation not allowed on service interface +JCA_10048=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: [JCA90042,JCI20002] Implementation missing service method operation2 service interface org.oasisopen.sca.test.Service1Superset +JCA_10049=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: [JCA90050] The number of Strings in the names attribute array of the @Service annotation MUST match the number of elements in the value attribute array +JCA_10050=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_10050Component1] - [ASM40003,ASM60003,JCA90045] Duplicate implementation service name: Component = TEST_JCA_10050Component1 Service = Service1 +JCA_10051=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: [JCA90059] The array of interfaces or classes specified by the value attribute of the @Service annotation +JCA_10052=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: [JCA90060] The value of each element in the @Service names array MUST be unique amongst all the other element values in the array +JCA_11005=org.oasisopen.sca.ServiceRuntimeException: [Component: TEST_JCA_11005Component1, Service: Service1] - [JCA100006] JAX-WS client-side asynchronous polling and callback methods are not allowed in service interfaces +JCA_11010=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_11010Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_1 are mutually exclusive +JCA_11011=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_11011Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_1 are mutually exclusive +JCA_11012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_11012Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_1 are mutually exclusive +JCA_11013=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_11013Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP are mutually exclusive +JCA_11014=org.oasisopen.sca.ServiceRuntimeException: [Contribution: JCA_11014, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_11014] - [JCA100018] Forbidden annotation interface javax.xml.ws.WebServiceClient found in class org.oasisopen.sca.test.Service1WithWebServiceClient +JCA_11016=Test service got an exception during execution: org.oasisopen.sca.ServiceRuntimeException Unable to bind [] - Unable to match the endpoint reference (***)EndpointReference: URI = TEST_JCA_11016Component1#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_11016Component2#service(Service3OperationsWebServiceProviderImpl) [Unresolved] with the policy of the service to which it refers, matching process was Match policy of (***)EndpointReference: URI = TEST_JCA_11016Component1#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_11016Component2#service(Service3OperationsWebServiceProviderImpl) [Unresolved] to (***)Endpoint: URI = TEST_JCA_11016Component2#service-binding(Service3OperationsWebServiceProviderImpl/Service3OperationsWebServiceProviderImpl) Match because the intents are resolved and there are no policy sets |||Match interface of (***)EndpointReference: URI = TEST_JCA_11016Component1#reference(reference1) WIRED_TARGET_NOT_FOUND Target = (***)Endpoint: URI = TEST_JCA_11016Component2#service(Service3OperationsWebServiceProviderImpl) [Unresolved] to (***)Endpoint: URI = TEST_JCA_11016Component2#service-binding(Service3OperationsWebServiceProviderImpl/Service3OperationsWebServiceProviderImpl) Operation operation3 not found on target|||Match failed because the interface contract mapper failed ||| +JCA_11020=Test service got an exception during execution: java.lang.IllegalArgumentException No matching operation is found: public abstract java.lang.String org.oasisopen.sca.test.Service2Operations.operation1(java.lang.String) +JCA_11022=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_11022Component2] - Component type service not found for component service (missing @Remotable annotation?): Component = TEST_JCA_11022Component2 Service = ServiceWithName +# Intent and PolicySet related tests +JCA_8001=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_8001Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent2 and {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent1 are mutually exclusive +JCA_8002=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Processing composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_8002: Resolving Java implementation: org.oasisopen.sca.test.service1BadIntent, [JCA70002,JCA70005] Method that is not an SCA reference cannot have policySet/intent annotations: public java.lang.String org.oasisopen.sca.test.service1BadIntent.operation1(java.lang.String) +JCA_8003=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Processing composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_8003: Resolving Java implementation: org.oasisopen.sca.test.service1BadIntent, [JCA70002,JCA70005] Field that is not an SCA reference cannot have policySet/intent annotations: public java.lang.String org.oasisopen.sca.test.service1BadIntent.someField +JCA_8004=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Processing composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_8004: Resolving Java implementation: org.oasisopen.sca.test.service1BadIntent, [JCA70002,JCA70005] Constructor parameter that is not an SCA reference cannot have policySet/intent annotations: public org.oasisopen.sca.test.service1BadIntent(java.lang.String)[0] +JCA_8006=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_8006Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent2 and {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent1 are mutually exclusive +JCA_8008=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Processing composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_8008: Resolving Java implementation: org.oasisopen.sca.test.service1BadPolicySet, [JCA70002,JCA70005] Method that is not an SCA reference cannot have policySet/intent annotations: public java.lang.String org.oasisopen.sca.test.service1BadPolicySet.operation1(java.lang.String) +JCA_8009=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Processing composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_8009: Resolving Java implementation: org.oasisopen.sca.test.service1BadPolicySet, [JCA70002,JCA70005] Field that is not an SCA reference cannot have policySet/intent annotations: public java.lang.String org.oasisopen.sca.test.service1BadPolicySet.someField +JCA_8010=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Processing composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_8010: Resolving Java implementation: org.oasisopen.sca.test.service1BadPolicySet, [JCA70002,JCA70005] Constructor parameter that is not an SCA reference cannot have policySet/intent annotations: public org.oasisopen.sca.test.service1BadPolicySet(java.lang.String)[0] diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/pom.xml b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/pom.xml new file mode 100644 index 0000000000..bb44cb9ab3 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/pom.xml @@ -0,0 +1,122 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-compliance-tests + 2.0 + ../pom.xml + + tuscany-compliance-test-java-ci + Apache Tuscany SCA Specification Compliance Tests Java CI + + + + + org.apache.tuscany.sca + tuscany-otests-sca-j-ci-tests + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-base-runtime + 2.0 + + + + org.apache.tuscany.sca + tuscany-binding-ws-runtime-axis2 + 2.0 + + + + org.mortbay.jetty + jetty + 6.1.19 + + + + junit + junit + 4.5 + test + + + + org.codehaus.woodstox + wstx-asl + 3.2.9 + + + + + + ${project.artifactId} + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Xms256m -Xmx1024m + + **/POJO_10004_TestCase.java + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + process-classes + + unpack + + + + + org.apache.tuscany.sca + oasis-jci-contributions + 2.0 + zip + ${project.build.directory}/oasis-contributions + + + org.apache.tuscany.sca + tuscany-otests-sca-j-ci-tests + 2.0 + jar + commons-logging.properties,oasis-sca-tests.properties,tuscany-oasis-sca-tests-errors.properties + ${project.build.directory}/test-classes + + + + + + + + + + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java new file mode 100644 index 0000000000..e7a161ae13 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java @@ -0,0 +1,217 @@ +/* + * 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.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.Node; +import org.apache.tuscany.sca.node.NodeFactory; + +import testClient.TestException_Exception; +import client.RuntimeBridge; + +/** + * 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; + + 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 boolean startContribution(String compositeName, String contributionLocation, String[] contributionNames) throws Exception { + try { + // Tuscany specific code which starts the contribution(s) holding the test + launcher = NodeFactory.newInstance(); + + Contribution[] contributions = new Contribution[contributionNames.length]; + String[] contributionURIs = getContributionURIs(contributionLocation, contributionNames); + for (int i = 0; i < contributions.length; i++) { + contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]); + } // end for + + node = launcher.createNode(compositeName, 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, String[] contributionNames) throws Exception { + String[] locations = new String[contributionNames.length]; + + if (locations != null && contributionLocation != null) { + + for (int i = 0; i < locations.length; i++) { + String aLocation = contributionLocation.replaceAll("%1", contributionNames[i]); + + 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 void checkError(String testName, Throwable ex) throws Throwable { + + String expectedMessage = expectedErrorMessages.getProperty(testName); + String receivedMessage = getErrorMessage(ex);//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 expected 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) { + } + } + + protected String getErrorMessage(Throwable ex) { + String errorMessage = null; + + if (ex instanceof TestException_Exception) { + TestException_Exception te = (TestException_Exception) ex; + errorMessage = te.getFaultInfo().getMessage(); + } else { + errorMessage = ex.getMessage(); + } + + return errorMessage; + } +} // end class TuscanyRuntimeBridge diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/resources/oasis-sca-tests.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/resources/oasis-sca-tests.properties new file mode 100644 index 0000000000..d1ef56cc4b --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/resources/oasis-sca-tests.properties @@ -0,0 +1,30 @@ +# 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=POJO + +# 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/target/%1.zip + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/resources/tuscany-oasis-sca-tests-errors.properties new file mode 100644 index 0000000000..4ca439037e --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/java-ci/src/test/resources/tuscany-oasis-sca-tests-errors.properties @@ -0,0 +1,39 @@ +# 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. +POJO_2003=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: [JCA90042,JCI20002] Implementation missing service method operation2 service interface org.oasisopen.sca.test.Service1Superset +POJO_5001=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.NoConstructorException: [JCI50001] No public constructor for class +POJO_5005=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.AmbiguousConstructorException: +POJO_5006=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.DuplicateConstructorException: [JCI50002] Multiple constructors marked with @Constructor +POJO_5007=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.InvalidConstructorException: [JCI50005] Multiple annotated constructors +POJO_8002=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8002Component1] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TEST_POJO_8002Component1 Service = Service1Superset Operation operationb not found on target +POJO_8003=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8003Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}suspendsTransaction and {http://docs.oasis-open.org/ns/opencsa/sca/200912}propagatesTransaction are mutually exclusive +POJO_8008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8008Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}suspendsTransaction and {http://docs.oasis-open.org/ns/opencsa/sca/200912}propagatesTransaction are mutually exclusive +POJO_8012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8012Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}***anagedTransaction and {http://docs.oasis-open.org/ns/opencsa/sca/200912}***anagedTransaction are mutually exclusive +POJO_8013=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.DuplicatePropertyException: duplicateProperty +POJO_8014=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.DuplicateReferenceException: duplicateReference +POJO_8030=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8030Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_1 and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_2 are mutually exclusive +POJO_8031=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8031Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP are mutually exclusive +POJO_8032=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8032Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP are mutually exclusive +POJO_8033=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8033Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP are mutually exclusive +POJO_8035=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8035Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_1 and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_2 are mutually exclusive +POJO_8037=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8037Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_1 and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_2 are mutually exclusive +POJO_9001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POJO_9001, Artifact: Test_POJO_9001.composite] - XMLSchema validation error occured in: Test_POJO_9001.composite ,line = ***, column = ***, Message = cvc-complex-type.3.2.2: Attribute 'interface' is not allowed to appear in element 'implementation.java'. +POJO_10001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POJO_10001, Artifact: META-INF/sca-contribution.xml] - [JCI10001] The value of the @package attribute on the element is not unique across all other elements within the contribution. +POJO_10004=TUSCANY-3880:org.apache.tuscany.sca.contribution.processor.ContributionResolveException: [JCI100007] A Java package org.oasisopen.sca.test;version=1.0.0 that is specified on an export element MUST be contained within the contribution containing the export element. +POJO_10005=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POJO_10005, Artifact: META-INF/sca-contribution.xml] - [JCI10004] The value of the @package attribute on the element is not unique across all other elements within the contribution. +POJO_10006=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: [JCI100007] A Java package org.oasisopen.sca.test.y that is specified on an export element MUST be contained within the contribution containing the export element. + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/pom.xml b/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/pom.xml new file mode 100644 index 0000000000..f024836561 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/pom.xml @@ -0,0 +1,128 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-compliance-tests + 2.0 + ../pom.xml + + tuscany-compliance-test-policy + Apache Tuscany SCA Specification Compliance Tests Policy + + + + + + + org.apache.tuscany.sca + tuscany-otests-policy-tests + 2.0 + + + + org.apache.tuscany.sca + tuscany-base-runtime + 2.0 + + + + org.apache.tuscany.sca + tuscany-binding-ws-runtime-axis2 + 2.0 + + + + org.mortbay.jetty + jetty + 6.1.19 + test + + + + org.codehaus.woodstox + wstx-asl + 3.2.9 + + + + junit + junit + 4.5 + test + + + + + + ${project.artifactId} + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Xms256m -Xmx1024m + + + **/POL_3002_TestCase.java + **/POL_4015_TestCase.java + **/POL_4016_TestCase.java + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + process-classes + + unpack + + + + + org.apache.tuscany.sca + oasis-policy-contributions + 2.0 + zip + ${project.build.directory}/oasis-contributions + + + org.apache.tuscany.sca + tuscany-otests-policy-tests + 2.0 + jar + commons-logging.properties,oasis-sca-tests.properties,tuscany-oasis-sca-tests-errors.properties + ${project.build.directory}/test-classes + + + + + + + + + + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java b/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java new file mode 100644 index 0000000000..a6ee41aab6 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/java/org/apache/tuscany/sca/otest/TuscanyRuntimeBridge.java @@ -0,0 +1,218 @@ +/* + * 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.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.Node; +import org.apache.tuscany.sca.node.NodeFactory; + +import testClient.TestException_Exception; +import client.RuntimeBridge; + +/** + * 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; + + 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 boolean startContribution(String compositeName, String contributionLocation, String[] contributionNames) throws Exception { + try { + // Tuscany specific code which starts the contribution(s) holding the test + launcher = NodeFactory.newInstance(); + + Contribution[] contributions = new Contribution[contributionNames.length]; + String[] contributionURIs = getContributionURIs(contributionLocation, contributionNames); + for (int i = 0; i < contributions.length; i++) { + contributions[i] = new Contribution(contributionNames[i], contributionURIs[i]); + } // end for + + node = launcher.createNode(compositeName, 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, String[] contributionNames) throws Exception { + String[] locations = new String[contributionNames.length]; + + if (locations != null && contributionLocation != null) { + + for (int i = 0; i < locations.length; i++) { + String aLocation = contributionLocation.replaceAll("%1", contributionNames[i]); + + 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 void checkError(String testName, Throwable ex) throws Throwable { + + String expectedMessage = expectedErrorMessages.getProperty(testName); + String receivedMessage = getErrorMessage(ex);//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 expected 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) { + } + } + + protected String getErrorMessage(Throwable ex) { + String errorMessage = null; + + if (ex instanceof TestException_Exception) { + TestException_Exception te = (TestException_Exception) ex; + errorMessage = te.getFaultInfo().getMessage(); + } else { + errorMessage = ex.getMessage(); + } + + return errorMessage; + } + +} // end class TuscanyRuntimeBridge diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/resources/oasis-sca-tests.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/resources/oasis-sca-tests.properties new file mode 100644 index 0000000000..0347fc3ec5 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/resources/oasis-sca-tests.properties @@ -0,0 +1,30 @@ +# 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/target/%1.zip + diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/resources/tuscany-oasis-sca-tests-errors.properties new file mode 100644 index 0000000000..33c5bcd62d --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/policy/src/test/resources/tuscany-oasis-sca-tests-errors.properties @@ -0,0 +1,57 @@ +# 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. + +POL_3001=org.oasisopen.sca.ServiceRuntimeException: WSDL document is using SOAP v1.2 but SOAP v1.1 is required by the specified policy intents +POL_3002=TUSCANY-3370 +POL_3003=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POL_3003, Artifact: META-INF/definitions.xml, Definitions: jar:file:***/POL_3003.zip!/META-INF/definitions.xml] - [ASM10001,POL30002] Duplicate intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}dupIntent found in domain +POL_3004=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POL_3004, Artifact: META-INF/definitions.xml, Definitions: jar:file:***/POL_3004.zip!/META-INF/definitions.xml] - [POL30004] Intent twoDefaults has more than one qualifier marked as the default qualifier +POL_3005=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POL_3005, Artifact: META-INF/definitions.xml, Definitions: jar:file:***/POL_3005.zip!/META-INF/definitions.xml] - [POL30005] The intent dupQualifiers has more than one qualifier with the name qual1 +POL_3006=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POL_3006, Artifact: META-INF/definitions.xml, Definitions: jar:file:***/POL_3006.zip!/META-INF/definitions.xml] - [POL30006] The profile intent name bad.ProfileIntent must not have the character "." in it +POL_3009=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POL_3009, Artifact: META-INF/definitions.xml, Definitions: jar:file:***/POL_3009.zip!/META-INF/definitions.xml] - [POL30010] The policy set TwoIntentMapPolicySet has more than one intent map with the name testIntent6 +POL_3012=org.oasisopen.sca.ServiceRuntimeException: [Contribution: http://tuscany.apache.org/SystemContribution] - [POL30015] Required Intent - {http://docs.oasis-open.org/ns/opencsa/scatests/200903}undefinedIntent2 not found for ProfileIntent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}badProfileIntent +POL_3013=org.oasisopen.sca.ServiceRuntimeException: [Contribution: http://tuscany.apache.org/SystemContribution] - [POL30016] Excluded Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}undefinedIntent not found for intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}noMuxIntent +POL_3014=org.oasisopen.sca.ServiceRuntimeException: [Contribution: Policy_General, Definitions: jar:file:***/Policy_General.zip!/META-INF/definitions.xml] - DuplicatePolicySet +POL_3015=org.apache.tuscany.sca.contribution.processor.ContributionReadException: javax.xml.xpath.XPathExpressionException +POL_3016=org.apache.tuscany.sca.contribution.processor.ContributionReadException: javax.xml.xpath.XPathExpressionException +POL_3017=org.oasisopen.sca.ServiceRuntimeException: [Contribution: http://tuscany.apache.org/SystemContribution] - [POL30020] The policy set {http://docs.oasis-open.org/ns/opencsa/scatests/200903}BadIntentMapPolicySet intent map testIntent6 has missing qualifiers: testIntent6.qual2 The intent map qualifiers must match the provided intent qualifiers. +POL_3018=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POL_3018, Artifact: META-INF/definitions.xml, Definitions: jar:file:***/POL_3018.zip!/META-INF/definitions.xml] - [POL30021] Intent Map provides for Intent not specified as provided by parent PolicySet - BadIntentMapPolicySet +POL_3020=TUSCANY-3371 +POL_4001=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntentExt2 associated with policy subject ***Endpoint: URI = TestClient#service-binding(TestInvocation/TestInvocation) has no matching policy set +POL_4004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_4004Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestCompositeImplIntent, Component: TestComposite0Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite1, Component: TestComposite1Component1] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testImplIntent.qual2 associated with policy subject {http://docs.oasis-open.org/ns/opencsa/sca/200912}implementation.java (class=org.oasisopen.sca.test.Service1Impl) has no matching policy set +POL_4005=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_4005Component1, Service: Service1] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testImplIntent.qual2 associated with policy subject ***Endpoint: URI = TEST_POL_4005Component1#service-binding(Service1/Service1) has no matching policy set +POL_4006=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}HighIntent associated with policy subject ***Endpoint: URI = TestClient#service-binding(TestInvocation/TestInvocation) has no matching policy set +POL_4009=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_4009Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestCompositeImplPolicySet, Component: TestComposite0Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite1, Component: TestComposite1Component1] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testImplIntent2 associated with policy subject {http://docs.oasis-open.org/ns/opencsa/sca/200912}implementation.java (class=org.oasisopen.sca.test.Service1Impl) has no matching policy set +POL_4010=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}DirectIntent associated with policy subject ***Endpoint: URI = TestClient#service-binding(TestInvocation/TestInvocation) has no matching policy set +POL_4012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent*** and {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent*** are mutually exclusive +POL_4018=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}DirectIntent associated with policy subject ***Endpoint: URI = TestClient#service-binding(TestInvocation/TestInvocation) has no matching policy set +POL_4027=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POL_4027, Artifact: META-INF/definitions.xml, Definitions:*** - [POL40020] Duplicate binding type {http://docs.oasis-open.org/ns/opencsa/sca/200912}dupBinding.type found in domain +POL_4028=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}] - [POL40002] The policy {http://docs.oasis-open.org/ns/opencsa/scatests/200903}PolicySetExtAttachProp has been attached to a property or one of its children. This is not allowed. +POL_4033=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POL_4033, Artifact: META-INF/definitions.xml, Definitions:*** - ContributionReadException occurred due to: org.apache.tuscany.sca.contribution.processor.ContributionReadException: javax.xml.xpath.XPathExpressionException +POL_5001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: http://tuscany.apache.org/SystemContribution] - [POL50001] An extension to support the implementation type {http://docs.oasis-open.org/ns/opencsa/sca/200912}unknown.type can't be found in the domain +POL_9006=org.oasisopen.sca.ServiceRuntimeException: [] - The Component reference reference1 can not require transactedOneWay because the implementation for Component TEST_POL_9006Component1 requires managedTransaction.local +POL_9009=org.oasisopen.sca.ServiceRuntimeException: [] - The Component service Service1 can not require transactedOneWay because the implementation for Component TEST_POL_9009Component2 requires managedTransaction.local +POL_9015=org.oasisopen.sca.ServiceRuntimeException: [] - The component service Service1 can not require propagatesTransaction because the implementation for component TEST_POL_9015Component1 requires managedTransaction.local +POL_9016=org.oasisopen.sca.ServiceRuntimeException: [] - The component service Service1 can not require propagatesTransaction because the implementation for component TEST_POL_9016Component1 requires noManagedTransaction +POL_9017=org.oasisopen.sca.ServiceRuntimeException: [] - The component reference reference1 can not require propagatesTransaction because the implementation for component TEST_POL_9017Component1 requires managedTransaction.local +POL_9018=org.oasisopen.sca.ServiceRuntimeException: [] - The component reference reference1 can not require propagatesTransaction because the implementation for component TEST_POL_9018Component1 requires noManagedTransaction +POL_9019=org.oasisopen.sca.ServiceRuntimeException: [***] - The Component reference reference1 can not require transactedOneWay because the implementation for Component TEST_POL_9019Component1 requires managedTransaction.local +POL_9020=org.oasisopen.sca.ServiceRuntimeException: [] - The component reference reference1 can not require transactedOneWay because the operation operation1 is a two way operation +POL_9021=org.oasisopen.sca.ServiceRuntimeException: [] - The component reference reference1 can not require immediateOneWay because the operation operation1 is a two way operation +POL_9022=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_9022Component1, Reference: Reference1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}*** and {http://docs.oasis-open.org/ns/opencsa/sca/200912}*** are mutually exclusive +POL_9023=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_9023Component2, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}*** and {http://docs.oasis-open.org/ns/opencsa/sca/200912}*** are mutually exclusive +POL_10001=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - The noListener intent may only be specified on a reference. +POL_11001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POL_11001, Artifact: Test_POL_11001.composite] - XMLSchema validation error occured in: Test_POL_11001.composite ,line = 21, column = 4, Message = cvc-complex-type.3.2.2: Attribute 'badAttribute' is not allowed to appear in element 'policySetAttachment'. diff --git a/sca-java-2.x/branches/2.0/testing/compliance-tests/pom.xml b/sca-java-2.x/branches/2.0/testing/compliance-tests/pom.xml new file mode 100644 index 0000000000..245f4dc942 --- /dev/null +++ b/sca-java-2.x/branches/2.0/testing/compliance-tests/pom.xml @@ -0,0 +1,78 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0 + ../../pom.xml + + + pom + tuscany-compliance-tests + Apache Tuscany SCA Compliance Tests + + + + + oasis.contributions + http://svn.apache.org/repos/asf/tuscany/maven + + + + apache.snapshots + http://repository.apache.org/snapshots + + + + + + default + + true + + + + + + + + + hudson + + assembly + + java-ci + policy + binding-ws + binding-jms + + + + + -- cgit v1.2.3