summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-08-11 07:33:59 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-08-11 07:33:59 +0000
commit2ce8d0e8318931ee7ad9da1876a95769142ae37f (patch)
tree3dd4a9ad259f1803e964451f7ad7ca4c0c80b2eb /sca-java-2.x/trunk/modules/interface-java-jaxws/src/main
parentaafc31da7ee0cbb8c5721386612e10d61a459ba3 (diff)
TUSCANY-3641 - Update interface processing to set remotable when @WebServiceProvider encountered
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@984313 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/interface-java-jaxws/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java b/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java
index 1d6b002361..c6e4891860 100644
--- a/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java
+++ b/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java
@@ -38,6 +38,7 @@ import javax.jws.soap.SOAPBinding.Style;
import javax.xml.namespace.QName;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
+import javax.xml.ws.WebServiceProvider;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
@@ -104,6 +105,7 @@ public class JAXWSJavaInterfaceProcessor implements JavaInterfaceVisitor {
final Class<?> clazz = contract.getJavaClass();
WebService webService = clazz.getAnnotation(WebService.class);
+
String tns = JavaXMLMapper.getNamespace(clazz);
String localName = clazz.getSimpleName();
if (webService != null) {
@@ -113,6 +115,16 @@ public class JAXWSJavaInterfaceProcessor implements JavaInterfaceVisitor {
// Mark SEI as Remotable
contract.setRemotable(true);
}
+
+ WebServiceProvider webServiceProvider = clazz.getAnnotation(WebServiceProvider.class);
+ if (webServiceProvider != null) {
+ tns = getValue(webServiceProvider.targetNamespace(), tns);
+ localName = getValue(webServiceProvider.serviceName(), localName);
+ contract.setQName(new QName(tns, localName));
+ // Mark SEI as Remotable
+ contract.setRemotable(true);
+ }
+
if (!contract.isRemotable()) {
return;
}