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

Deepal Jayasinghe reassigned AXIS2-775:
---------------------------------------

    Assign To: Ajith Harshana Ranabahu

> 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)
>         Type: Bug

>   Components: databinding
>     Versions: 1.0
>  Environment: Axis2 1.0
>     Reporter: Kent Tong
>     Assignee: Ajith Harshana Ranabahu

>
> In DatabindingTemplate.xsl, the code is like:
>     <xsl:template match="[EMAIL PROTECTED]'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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to