summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
authorbdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68>2010-08-06 04:03:57 +0000
committerbdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68>2010-08-06 04:03:57 +0000
commit4665f0e91d0c8934bb463da10cf57d919c7d424b (patch)
tree031ba5d8aaffb96ed8cae15d12d4189a10c2c061 /sca-java-2.x/trunk
parentf2b42e0aa1bf6478bda803aea9f0040e0e3fa533 (diff)
Report an error if a class annotated with @WebServiceClient is used as an SCA interface (JCA 11014)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@982867 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r--sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java6
-rw-r--r--sca-java-2.x/trunk/modules/interface-java/src/main/resources/interface-javaxml-validation-messages.properties1
2 files changed, 7 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java b/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java
index 805e691f16..8502d4f4e8 100644
--- a/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java
+++ b/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java
@@ -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 implements StAXArtifactProcessor<JavaInterfa
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()) {
diff --git a/sca-java-2.x/trunk/modules/interface-java/src/main/resources/interface-javaxml-validation-messages.properties b/sca-java-2.x/trunk/modules/interface-java/src/main/resources/interface-javaxml-validation-messages.properties
index 73a25551b7..329f55e0a7 100644
--- a/sca-java-2.x/trunk/modules/interface-java/src/main/resources/interface-javaxml-validation-messages.properties
+++ b/sca-java-2.x/trunk/modules/interface-java/src/main/resources/interface-javaxml-validation-messages.properties
@@ -24,4 +24,5 @@ InvalidInterfaceException = InvalidInterfaceException due to: {0}
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}