From f2b42e0aa1bf6478bda803aea9f0040e0e3fa533 Mon Sep 17 00:00:00 2001 From: bdaniel Date: Fri, 6 Aug 2010 03:44:35 +0000 Subject: Treat java interfaces annotated with @SOAPBinding as having the SOAP intent (JCA_11012) git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@982861 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/interfacedef/java/impl/PolicyJavaInterfaceVisitor.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sca-java-2.x/trunk/modules') diff --git a/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/PolicyJavaInterfaceVisitor.java b/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/PolicyJavaInterfaceVisitor.java index 1610a2e8ec..8f760e8593 100644 --- a/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/PolicyJavaInterfaceVisitor.java +++ b/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/PolicyJavaInterfaceVisitor.java @@ -25,8 +25,10 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +import javax.jws.soap.SOAPBinding; import javax.xml.namespace.QName; +import org.apache.tuscany.sca.assembly.xml.Constants; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; @@ -104,6 +106,13 @@ public class PolicyJavaInterfaceVisitor implements JavaInterfaceVisitor { } } } + + if ( clazz.getAnnotation(SOAPBinding.class) != null ) { + // add soap intent + Intent intent = policyFactory.createIntent(); + intent.setName(Constants.SOAP_INTENT); + requiredIntents.add(intent); + } } private void readIntents(Requires intentAnnotation, List requiredIntents) { -- cgit v1.2.3