diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-09-17 18:10:18 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-09-17 18:10:18 +0000 |
commit | 51e5ca754d3d79393793fddcfd6079f3b0c70d8a (patch) | |
tree | 596d6a05fc034ec253af5caea34b735b6e4f72ac /sca-java-2.x/trunk/modules/interface-java-jaxws/src/main | |
parent | 7cb62d52d3c3b680c6984b987a1b212445c1bef8 (diff) |
TUSCANY-3664 Migrate 1.x Holder support to 2.x and add support for non-void methods and multiple Holders
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@998232 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.java | 21 |
1 files changed, 17 insertions, 4 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 f18ea0118f..735f8cf269 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 @@ -31,14 +31,13 @@ import java.util.List; import javax.jws.Oneway; import javax.jws.WebMethod; import javax.jws.WebParam; +import javax.jws.WebParam.Mode; import javax.jws.WebResult; -import javax.jws.WebService; import javax.jws.soap.SOAPBinding; 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.FactoryExtensionPoint; @@ -51,14 +50,13 @@ import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.FaultExceptionMapper; import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.interfacedef.ParameterMode; import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl; import org.apache.tuscany.sca.interfacedef.java.JavaInterface; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract; import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; import org.apache.tuscany.sca.interfacedef.java.JavaOperation; import org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor; import org.apache.tuscany.sca.interfacedef.util.ElementInfo; -import org.apache.tuscany.sca.interfacedef.util.JavaXMLMapper; import org.apache.tuscany.sca.interfacedef.util.TypeInfo; import org.apache.tuscany.sca.interfacedef.util.WrapperInfo; import org.apache.tuscany.sca.interfacedef.util.XMLType; @@ -89,10 +87,21 @@ public class JAXWSJavaInterfaceProcessor implements JavaInterfaceVisitor { this.wsdlFactory = factories.getFactory(WSDLFactory.class); } + public JAXWSJavaInterfaceProcessor() { super(); } + private ParameterMode getParameterMode(WebParam.Mode mode) { + if (mode == Mode.INOUT) { + return ParameterMode.INOUT; + } else if (mode == Mode.OUT) { + return ParameterMode.OUT; + } else { + return ParameterMode.IN; + } + } + private static String capitalize(String name) { if (name == null || name.length() == 0) { return name; @@ -173,6 +182,7 @@ public class JAXWSJavaInterfaceProcessor implements JavaInterfaceVisitor { if (logical instanceof XMLType) { ((XMLType)logical).setElementName(element); } + operation.getParameterModes().set(i, getParameterMode(param.mode())); } } WebResult result = method.getAnnotation(WebResult.class); @@ -282,6 +292,9 @@ public class JAXWSJavaInterfaceProcessor implements JavaInterfaceVisitor { type = ((XMLType)logical).getTypeName(); } inputElements.add(new ElementInfo(element, new TypeInfo(type, false, null))); + if (param != null) { + operation.getParameterModes().set(i, getParameterMode(param.mode())); + } } List<ElementInfo> outputElements = new ArrayList<ElementInfo>(); |