Author: thomas.diesler(a)jboss.com
Date: 2008-05-28 09:52:42 -0400 (Wed, 28 May 2008)
New Revision: 7194
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
Log:
[JBWS-2035] Cannot determine variable name for void wrapper
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2008-05-28
13:30:23 UTC (rev 7193)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2008-05-28
13:52:42 UTC (rev 7194)
@@ -795,15 +795,18 @@
throw new WSException("Cannot obtain java/xml type mapping for:
" + xmlType);
Map<String, String> map =
createVariableMappingMap(javaXmlTypeMapping.getVariableMappings());
- String elementName = returnValueMapping.getWsdlMessagePartName();
- String variable = map.get(elementName);
- if (variable == null)
- throw new IllegalArgumentException("Could not determine variable name
for element: " + elementName);
+ if (map.size() > 0)
+ {
+ String elementName = returnValueMapping.getWsdlMessagePartName();
+ String variable = map.get(elementName);
+ if (variable == null)
+ throw new IllegalArgumentException("Could not determine variable
name for element: " + elementName);
- String wrappedType = returnValueMapping.getMethodReturnValue();
- QName element = new QName(elementName);
- WrappedParameter wrappedParameter = new WrappedParameter(element,
wrappedType, variable, WrappedParameter.RETURN);
- wrappedResponseParameters.add(0, wrappedParameter);
+ String wrappedType = returnValueMapping.getMethodReturnValue();
+ QName element = new QName(elementName);
+ WrappedParameter wrappedParameter = new WrappedParameter(element,
wrappedType, variable, WrappedParameter.RETURN);
+ wrappedResponseParameters.add(0, wrappedParameter);
+ }
}
outMetaData.setWrappedParameters(wrappedResponseParameters);