axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r359391 - /webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/DatabindingTemplate.xsl
Date Wed, 28 Dec 2005 04:33:01 GMT
Author: chinthaka
Date: Tue Dec 27 20:32:55 2005
New Revision: 359391

URL: http://svn.apache.org/viewcvs?rev=359391&view=rev
Log:
Fixing un-necessary building of om during toOM coversion

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/DatabindingTemplate.xsl

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/DatabindingTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/DatabindingTemplate.xsl?rev=359391&r1=359390&r2=359391&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/DatabindingTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/DatabindingTemplate.xsl
Tue Dec 27 20:32:55 2005
@@ -20,17 +20,14 @@
                 org.apache.axis2.om.impl.llom.builder.StAXOMBuilder builder = new org.apache.axis2.om.impl.llom.builder.StAXOMBuilder
                 (org.apache.axis2.om.OMAbstractFactory.getOMFactory(),new org.apache.axis2.util.StreamWrapper(param.newXMLStreamReader()))
;
 
+                org.apache.axis2.om.OMElement documentElement = builder.getDocumentElement();
                 <xsl:choose>
                     <xsl:when test="$base64">
-                         org.apache.axis2.om.OMElement documentElement = builder.getDocumentElement();
                          optimizeContent(documentElement,qNameArray);
-                         return documentElement;
                     </xsl:when>
-                    <xsl:otherwise>
-                        return  builder.getDocumentElement();
-                    </xsl:otherwise>
                 </xsl:choose>
-
+                  ((org.apache.axis2.om.impl.OMNodeEx)documentElement).setParent(null);
+                  return documentElement;
                 }
             </xsl:if>
 
@@ -94,7 +91,9 @@
                         if (param instanceof org.apache.axis2.databinding.ADBBean){
                             org.apache.axis2.om.impl.llom.builder.StAXOMBuilder builder =
new org.apache.axis2.om.impl.llom.builder.StAXOMBuilder
                             (org.apache.axis2.om.OMAbstractFactory.getOMFactory(), param.getPullParser(param.MY_QNAME));
-                            return builder.getDocumentElement();
+                            org.apache.axis2.om.OMElement documentElement = builder.getDocumentElement();
+                            ((org.apache.axis2.om.impl.OMNodeEx) documentElement).setParent(null);
// remove the parent link
+                            return documentElement;
                         }else{
                            <!-- treat this as a plain bean. use the reflective bean converter
-->
                            //todo finish this onece the bean serializer has the necessary
methods



Mime
View raw message