Author: scheu
Date: Fri Dec 10 18:05:28 2010
New Revision: 1044461

URL: http://svn.apache.org/viewvc?rev=1044461&view=rev
Log:
AXIS2-4907
Contributor:Rich Scheuerle
Summary:
Added shortcuts to the JAX-WS JAXBWrapperTool to speed-up wrapper bean 
processing when the wrapper bean
has zero or one child properties.

Modified:
    
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java?rev=1044461&r1=1044460&r2=1044461&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
 Fri Dec 10 18:05:28 2010
@@ -161,8 +161,18 @@ public class DocLitWrappedMethodMarshall
                             returnName,
                             marshalDesc.getPropertyDescriptorMap(
                                     wrapperObject.getClass()).get(returnName));
-
                     returnValue = object;
+                    // returnValue may be incompatible with JAX-WS signature
+                    if (ConvertUtils.isConvertable(returnValue, returnType)) {
+                        returnValue = ConvertUtils.convert(returnValue, 
returnType);
+                    } else {
+                        String objectClass =
+                                (returnValue == null) ? "null" : 
returnValue.getClass().getName();
+                        throw ExceptionFactory.makeWebServiceException(
+                                Messages.getMessage("convertProblem", 
objectClass,
+                                                    returnType.getName()));
+                    }
+                    
                 } else {
                     returnValue = wrapperObject;
                 }


Reply via email to