You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2006/09/12 16:36:28 UTC
svn commit: r442593 -
/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
Author: dims
Date: Tue Sep 12 07:36:27 2006
New Revision: 442593
URL: http://svn.apache.org/viewvc?view=rev&rev=442593
Log:
Fix for AXIS2-1141 Incorrect behaviour when Code Generating for "xsd:base64Binary"
Fix for AXIS2-1125 Compilation error from WSDL2Java on a complex type with two base64binary elements
Fix for AXIS2-1121 binary and enumFacet are incompatible with unordered in ADBBeanTemplate
Modified:
webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl?view=diff&rev=442593&r1=442592&r2=442593
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl Tue Sep 12 07:36:27 2006
@@ -762,11 +762,6 @@
<!-- Note - Assumed to be OMElement-->
<xsl:value-of select="$varName"/>.serialize(xmlWriter);
</xsl:when>
- <!-- handle the binary case -->
- <xsl:when test="@binary">
- org.apache.axiom.om.impl.llom.OMTextImpl binaryTextNode = new org.apache.axiom.om.impl.llom.OMTextImpl( <xsl:value-of select="$varName"/>, org.apache.axiom.om.OMAbstractFactory.getOMFactory());
- binaryTextNode.internalSerializeAndConsume(xmlWriter);
- </xsl:when>
<!-- handle all other cases -->
<xsl:otherwise>
namespace = "<xsl:value-of select="$namespace"/>";
@@ -789,8 +784,17 @@
xmlWriter.writeStartElement("<xsl:value-of select="$propertyName"/>");
}
- xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(<xsl:value-of select="$varName"/>));
- xmlWriter.writeEndElement();
+ <xsl:choose>
+ <!-- handle the binary case -->
+ <xsl:when test="@binary">
+ org.apache.axiom.om.impl.llom.OMTextImpl <xsl:value-of select="$varName"/>_binary = new org.apache.axiom.om.impl.llom.OMTextImpl( <xsl:value-of select="$varName"/>, org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+ <xsl:value-of select="$varName"/>_binary.internalSerializeAndConsume(xmlWriter);
+ </xsl:when>
+ <xsl:otherwise>
+ xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(<xsl:value-of select="$varName"/>));
+ </xsl:otherwise>
+ </xsl:choose>
+ xmlWriter.writeEndElement();
</xsl:otherwise>
</xsl:choose>
<xsl:if test="$min=0 or $choice">}</xsl:if>
@@ -1322,13 +1326,8 @@
</xsl:otherwise>
</xsl:choose>
<xsl:if test="not(enumFacet)">
- <xsl:if test="not(@binary)">
if (reader.isStartElement() && <xsl:value-of select="$propQName"/>.equals(reader.getName())){
</xsl:if>
- <xsl:if test="@binary">
- if (reader.isStartElement()){
- </xsl:if>
- </xsl:if>
<xsl:choose>
<xsl:when test="@array">
<!-- We must be a named type or element with anonymous type. -->
@@ -1499,6 +1498,7 @@
<!-- end of OMelement handling -->
<!-- start of the simple types handling for binary content-->
<xsl:when test="@binary">
+ reader.next();
if (isReaderMTOMAware
&&
java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_BINARY)))
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org