axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kent Tong (JIRA)" <>
Subject [jira] Created: (AXIS2-775) dead code in DatabindingTemplate.xsl preventing MTOM from being used
Date Sun, 28 May 2006 09:30:29 GMT
dead code in DatabindingTemplate.xsl preventing MTOM from being used

         Key: AXIS2-775
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug

  Components: databinding  
    Versions: 1.0    
 Environment: Axis2 1.0
    Reporter: Kent Tong

In DatabindingTemplate.xsl, the code is like:
    <xsl:template match="databinders[@dbtype='xmlbeans']">
        <xsl:variable name="base64"><xsl:value-of select="base64Elements/name"/></xsl:variable>
        <xsl:if test="$base64">
            private static javax.xml.namespace.QName[] qNameArray = {...

The problem is, if base64 schema types are found, the source document generated is like (this
xml document below is the debug output from Axis2):
	isAsync="1" isSync="1" name="FileServiceMessageReceiverInOnly"
	package="" skeletonInterfaceName="FileServiceSkeleton"
	<databinders dbtype="xmlbeans">
			<name localName="file"
				ns-url="" />
	<fault-list />

You can see that the <name> element has no text content. As the $base64 variable is
set to the text value of the first node of the node set base64Elements/name, it will be an
empty string which is treated as false in the subsequent xsl:if condition. The result is that
the qNameArray will not be generated and the MTOM will be disabled. It seems that the template
should be changed to:

        <xsl:variable name="base64"><xsl:value-of select="count(base64Elements/name)>0"/></xsl:variable>

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message