[jboss-svn-commits] JBossWS SVN: r656 - trunk/src/main/java/org/jboss/ws/metadata

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Jul 31 13:08:52 EDT 2006


Author: thomas.diesler at jboss.com
Date: 2006-07-31 13:08:49 -0400 (Mon, 31 Jul 2006)
New Revision: 656

Modified:
   trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java
Log:
fix sync of INOUT parameters

Modified: trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java	2006-07-31 17:06:24 UTC (rev 655)
+++ trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java	2006-07-31 17:08:49 UTC (rev 656)
@@ -205,6 +205,14 @@
                            continue;
                         }
                      }
+                     else
+                     {
+                        if (returnType != void.class)
+                        {
+                           log.debug("Unmatched return meta data: " + returnType);
+                           continue;
+                        }
+                     }
 
                      // compare params by java type name
                      if (compareMethodParams(methodTypes, true))
@@ -278,47 +286,53 @@
       QName xmlType = paramMetaData.getXmlType();
       String javaType = paramMetaData.getJavaTypeName();
 
-      boolean pass;
-      if (paramMetaData.getMode() != ParameterMode.IN)
+      boolean pass = true;
+      if (paramMetaData != returnParam && paramMetaData.getMode() != ParameterMode.IN)
       {
          if (HolderUtils.isHolderType(methodParam))
          {
             methodParam = HolderUtils.getValueType(methodParam);
          }
-      }
-
-      TypeMappingImpl typeMapping = epMetaData.getServiceMetaData().getTypeMapping();
-
-      // In case the parameter java type has not been initialized
-      // This happens when the UMDM is build from WSDL only (i.e. JAXWS Service)
-      if (javaType == null)
-      {
-         javaType = methodParam.getName();
-         paramMetaData.setJavaTypeName(javaType);
-         log.debug("Set parameter java type from method param: " + javaType);
-
-         if (epMetaData.getType() == Type.JAXWS)
+         else
          {
-            typeMapping.register(methodParam, xmlType, new JAXBSerializerFactory(), new JAXBDeserializerFactory());
+            pass = false;
          }
       }
 
-      if (matchByTypeName)
+      if (pass == true)
       {
-         pass = methodParam.getName().equals(javaType);
-      }
-      else
-      {
-         String paramTypeName = methodParam.getName();
-         Class paramType = paramMetaData.getJavaType();
-         pass = JavaUtils.isAssignableFrom(methodParam, paramType);
+         // In case the parameter java type has not been initialized
+         // This happens when the UMDM is build from WSDL only (i.e. JAXWS Service)
+         TypeMappingImpl typeMapping = epMetaData.getServiceMetaData().getTypeMapping();
+         if (javaType == null)
+         {
+            javaType = methodParam.getName();
+            paramMetaData.setJavaTypeName(javaType);
+            log.debug("Set parameter java type from method param: " + javaType);
 
-         if (pass == false && typeMapping.isRegistered(methodParam, xmlType))
+            if (epMetaData.getType() == Type.JAXWS)
+            {
+               typeMapping.register(methodParam, xmlType, new JAXBSerializerFactory(), new JAXBDeserializerFactory());
+            }
+         }
+         
+         if (matchByTypeName)
          {
-            log.debug("Adjust parameter type from " + paramType.getName() + " to " + paramTypeName);
-            paramMetaData.setJavaTypeName(paramTypeName);
-            pass = true;
+            pass = methodParam.getName().equals(javaType);
          }
+         else
+         {
+            String paramTypeName = methodParam.getName();
+            Class paramType = paramMetaData.getJavaType();
+            pass = JavaUtils.isAssignableFrom(methodParam, paramType);
+
+            if (typeMapping.isRegistered(methodParam, xmlType))
+            {
+               log.debug("Adjust parameter type from " + paramType.getName() + " to " + paramTypeName);
+               paramMetaData.setJavaTypeName(paramTypeName);
+               pass = true;
+            }
+         }
       }
 
       String name = (matchByTypeName) ? paramMetaData.getJavaTypeName() : paramMetaData.getJavaType().getName();




More information about the jboss-svn-commits mailing list