You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by bd...@apache.org on 2010/08/06 06:03:57 UTC

svn commit: r982867 - in /tuscany: otest/newlayout/tuscany-java-caa-test-runner/src/test/resources/ sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/ sca-java-2.x/trunk/modules/interface-java/src/main...

Author: bdaniel
Date: Fri Aug  6 04:03:57 2010
New Revision: 982867

URL: http://svn.apache.org/viewvc?rev=982867&view=rev
Log:
Report an error if a class annotated with @WebServiceClient is used as an SCA interface (JCA 11014)

Modified:
    tuscany/otest/newlayout/tuscany-java-caa-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties
    tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java
    tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/resources/interface-javaxml-validation-messages.properties

Modified: tuscany/otest/newlayout/tuscany-java-caa-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties
URL: http://svn.apache.org/viewvc/tuscany/otest/newlayout/tuscany-java-caa-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties?rev=982867&r1=982866&r2=982867&view=diff
==============================================================================
--- tuscany/otest/newlayout/tuscany-java-caa-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties (original)
+++ tuscany/otest/newlayout/tuscany-java-caa-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties Fri Aug  6 04:03:57 2010
@@ -47,6 +47,7 @@ JCA_10051=org.apache.tuscany.sca.contrib
 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_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_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
 # 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)

Modified: tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java?rev=982867&r1=982866&r2=982867&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java Fri Aug  6 04:03:57 2010
@@ -31,6 +31,7 @@ import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.ws.WebServiceClient;
 
 import org.apache.tuscany.sca.assembly.xml.PolicySubjectProcessor;
 import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
@@ -279,6 +280,11 @@ public class JavaInterfaceProcessor impl
                     error(monitor, "ForbiddenAnnotationJCA30008", javaInterfaceContract, a.annotationType(), ifc.getName());
                 }
             }
+            
+            if ( a.annotationType().equals(WebServiceClient.class) ) {
+            	error(monitor, "ForbiddenAnnotationJCA100018", javaInterfaceContract, a.annotationType(), ifc.getName());
+            }
+            	
         }
         for (Method m : ifc.getMethods()) {
             for (Annotation a : m.getAnnotations()) {

Modified: tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/resources/interface-javaxml-validation-messages.properties
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/resources/interface-javaxml-validation-messages.properties?rev=982867&r1=982866&r2=982867&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/resources/interface-javaxml-validation-messages.properties (original)
+++ tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/resources/interface-javaxml-validation-messages.properties Fri Aug  6 04:03:57 2010
@@ -24,4 +24,5 @@ InvalidInterfaceException = InvalidInter
 ForbiddenAnnotationJCA30006 = [JCA30006] Forbidden annotation {0} found on service interface in class {1}
 ForbiddenAnnotationJCA30007 = [JCA30007] Forbidden annotation {0} found on callback interface in class {1}
 ForbiddenAnnotationJCA30008 = [JCA30008] Forbidden annotation {0} found in class {1}
+ForbiddenAnnotationJCA100018 = [JCA100018] Forbidden annotation {0} found in class {1}