[jbossws-commits] JBossWS SVN: r2439 - branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Thu Feb 22 05:30:16 EST 2007


Author: darran.lofthouse at jboss.com
Date: 2007-02-22 05:30:16 -0500 (Thu, 22 Feb 2007)
New Revision: 2439

Modified:
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
Log:
Remove unused code from JBWS-1260 changes.

Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java	2007-02-22 02:52:49 UTC (rev 2438)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java	2007-02-22 10:30:16 UTC (rev 2439)
@@ -533,58 +533,6 @@
       return true;
    }
 
-   private void unwrapResponse(ServiceEndpointMethodMapping methodMapping, QName messageName, XSTypeDefinition xt)
-   {
-      if (xt instanceof XSComplexTypeDefinition == false)
-         throw new WSException("Tried to unwrap a non-complex type.");
-
-      XSComplexTypeDefinition wrapper = (XSComplexTypeDefinition)xt;
-      XSParticle particle = wrapper.getParticle();
-      XSTerm term = particle.getTerm();
-      if (term instanceof XSModelGroup == false)
-         throw new WSException("Expected model group, could not unwrap");
-      unwrapResponseParticles(methodMapping, messageName, (XSModelGroup)term);
-   }
-
-   private boolean unwrapResponseParticles(ServiceEndpointMethodMapping methodMapping, QName messageName, XSModelGroup group)
-   {
-      if (group.getCompositor() != XSModelGroup.COMPOSITOR_SEQUENCE)
-         throw new WSException("Only a sequence type can be unwrapped.");
-
-      XSObjectList particles = group.getParticles();
-
-      for (int i = 0; i < particles.getLength(); i++)
-      {
-         XSParticle particle = (XSParticle)particles.item(i);
-         XSTerm term = particle.getTerm();
-         if (term instanceof XSModelGroup)
-         {
-            if (unwrapResponseParticles(methodMapping, messageName, (XSModelGroup)term))
-               return true;
-         }
-         else if (term instanceof XSElementDeclaration)
-         {
-            XSElementDeclaration element = (XSElementDeclaration)term;
-            QName xmlName = new QName(element.getNamespace(), element.getName());
-            QName xmlType = new QName(element.getTypeDefinition().getNamespace(), element.getTypeDefinition().getName());
-            boolean array = particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1;
-            boolean primitive = !(element.getNillable() || (particle.getMinOccurs() == 0 && particle.getMaxOccurs() == 1));
-
-            String javaType = getJavaTypeAsString(xmlName, xmlType, array, primitive);
-
-            WsdlReturnValueMapping wrvm = new WsdlReturnValueMapping(methodMapping);
-            wrvm.setMethodReturnValue(javaType);
-            wrvm.setWsdlMessage(new QName(messageName.getNamespaceURI(), messageName.getLocalPart(), WSToolsConstants.WSTOOLS_CONSTANT_MAPPING_WSDL_MESSAGE_NS));
-            wrvm.setWsdlMessagePartName(xmlName.getLocalPart());
-            methodMapping.setWsdlReturnValueMapping(wrvm);
-
-            return true;
-         }
-      }
-
-      return false;
-   }
-
    private void checkEssentials()
    {
       if (typeMapping == null)




More information about the jbossws-commits mailing list