summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/interface-java-jaxws
diff options
context:
space:
mode:
authorscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-01-25 03:38:57 +0000
committerscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-01-25 03:38:57 +0000
commita9efdb471e6d1cdb32776fa12a459f076bab7419 (patch)
treeb4b6f0a5a86c2694d9edadf13a0bdaf27e0cedda /sca-java-2.x/trunk/modules/interface-java-jaxws
parent08a9cd21f56f16bba739d6a3ec1c4f0c6887d37d (diff)
Fix bare+JAXB wsdlgen case. Fix Holder+void_return_type case.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1063125 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/interface-java-jaxws')
-rw-r--r--sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java18
1 files changed, 13 insertions, 5 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 da70b3ffba..8e65cca7e6 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
@@ -184,16 +184,25 @@ public class JAXWSJavaInterfaceProcessor implements JavaInterfaceVisitor {
}
operation.getParameterModes().set(i, getParameterMode(param.mode()));
}
+ ParameterMode mode = operation.getParameterModes().get(i);
}
+
+ //
+ // Note for BARE mapping this will NOT be WS-I compliant, but let's assume this is not the place to
+ // worry about non-compliance, and keep on going.
+ //
WebResult result = method.getAnnotation(WebResult.class);
if (result != null) {
String ns = getValue(result.targetNamespace(), tns);
// Default to <operationName>Response for doc-bare
String name = getValue(result.name(), documentStyle ? operationName + "Response" : "return");
QName element = new QName(ns, name);
- Object logical = operation.getOutputType().getLogical();
- if (logical instanceof XMLType) {
- ((XMLType)logical).setElementName(element);
+ if (!operation.hasReturnTypeVoid()) {
+ List<DataType> outputDataTypes = operation.getOutputType().getLogical();
+ DataType returnDataType = outputDataTypes.get(0);
+ if (returnDataType instanceof XMLType) {
+ ((XMLType)returnDataType).setElementName(element);
+ }
}
}
// FIXME: [rfeng] For the BARE mapping, do we need to create a Wrapper?
@@ -290,8 +299,7 @@ public class JAXWSJavaInterfaceProcessor implements JavaInterfaceVisitor {
name = getValue(name, "return");
QName element = new QName(ns, name);
- // This must be a check for void?
- if ((operation.getOutputType() != null) && (operation.getOutputType().getLogical().size() != 0)) {
+ if (!operation.hasReturnTypeVoid()) {
Object logical = operation.getOutputType().getLogical().get(0).getLogical();
QName type = null;
if (logical instanceof XMLType) {