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 "Ajith Harshana Ranabahu (JIRA)" <ji...@apache.org> on 2006/07/19 16:04:14 UTC

[jira] Resolved: (AXIS2-775) dead code in DatabindingTemplate.xsl preventing MTOM from being used

     [ http://issues.apache.org/jira/browse/AXIS2-775?page=all ]

Ajith Harshana Ranabahu resolved AXIS2-775.
-------------------------------------------

    Resolution: Fixed

Fixed in the latest SVN. Thanks for pointing out the correction :)

> dead code in DatabindingTemplate.xsl preventing MTOM from being used
> --------------------------------------------------------------------
>
>                 Key: AXIS2-775
>                 URL: http://issues.apache.org/jira/browse/AXIS2-775
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.0
>         Environment: Axis2 1.0
>            Reporter: Kent Tong
>         Assigned To: Ajith Harshana Ranabahu
>
> 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):
> <interface
> 	basereceiver="org.apache.axis2.receivers.AbstractInMessageReceiver"
> 	isAsync="1" isSync="1" name="FileServiceMessageReceiverInOnly"
> 	package="com.foo.fs" skeletonInterfaceName="FileServiceSkeleton"
> 	skeletonname="FileServiceSkeleton">
> 	<databinders dbtype="xmlbeans">
> 		<base64Elements>
> 			<name localName="file"
> 				ns-url="http://foo.com/FileService/schema" />
> 		</base64Elements>
> 		...
> 	</databinders>
> 	<fault-list />
> </interface>
> 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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org