[jbossws-commits] JBossWS SVN: r4520 - legacy/branches/dlofthouse/JBWS-1801/jbossws-core/src/java/org/jboss/ws/tools/helpers.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Tue Sep 4 10:32:27 EDT 2007


Author: darran.lofthouse at jboss.com
Date: 2007-09-04 10:32:27 -0400 (Tue, 04 Sep 2007)
New Revision: 4520

Modified:
   legacy/branches/dlofthouse/JBWS-1801/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
Log:
Initial fix implementation.

Modified: legacy/branches/dlofthouse/JBWS-1801/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
===================================================================
--- legacy/branches/dlofthouse/JBWS-1801/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java	2007-09-04 14:28:50 UTC (rev 4519)
+++ legacy/branches/dlofthouse/JBWS-1801/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java	2007-09-04 14:32:27 UTC (rev 4520)
@@ -489,7 +489,8 @@
                if (isDocStyle())
                {
                   XSTypeDefinition xt = getXSType(input);
-                  addJavaXMLTypeMap(xt, input.getElement().getLocalPart(), "", "", jwm, !isWrapped());
+                  // Don't unwrap the actual parameter.
+                  addJavaXMLTypeMap(xt, input.getElement().getLocalPart(), "", "", jwm, false);
                }
                else
                {
@@ -503,7 +504,8 @@
                if (isDocStyle())
                {
                   XSTypeDefinition xt = getXSType(output);
-                  addJavaXMLTypeMap(xt, output.getElement().getLocalPart(), "", "", jwm, !isWrapped());
+                  // Don't unwrap the response type.
+                  addJavaXMLTypeMap(xt, output.getElement().getLocalPart(), "", "", jwm, false);
                }
                else
                {
@@ -704,7 +706,7 @@
             }
          }
 
-         if ((skipWrapperArray && isRepresentsArray(xt)) == false)
+         if ((skipWrapperArray && SchemaUtils.isWrapperArrayType(xt)) == false)
          {
             jxtm = new JavaXmlTypeMapping(jwm);
             String javaType;
@@ -900,40 +902,6 @@
    }
 
    /**
-    * Checks whether the type represents an array type
-    *
-    * @param xst
-    * @return true: type represents an array
-    */
-   private boolean isRepresentsArray(XSTypeDefinition xst)
-   {
-      boolean bool = false;
-      if (xst instanceof XSComplexTypeDefinition)
-      {
-         XSComplexTypeDefinition xc = (XSComplexTypeDefinition)xst;
-         if (xc.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_EMPTY)
-            return false;
-         XSParticle xsp = xc.getParticle();
-
-         if (xsp == null)
-            return false;
-
-         XSTerm xsterm = xsp.getTerm();
-         if (xsterm instanceof XSModelGroup)
-         {
-            XSModelGroup xm = (XSModelGroup)xsterm;
-            XSObjectList xo = xm.getParticles();
-            if (xo.getLength() == 1)
-            {
-               XSParticle xp = (XSParticle)xo.item(0);
-               bool = xp.getMaxOccursUnbounded() || xp.getMaxOccurs() > 1;
-            }
-         }
-      }
-      return bool;
-   }
-
-   /**
     * Any custom decisions that need to be made will be done here
     *
     * @param javaType




More information about the jbossws-commits mailing list