axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5832) Missing Brackets in ADBBeanTemplate-bean.xsl
Date Fri, 05 Jan 2018 14:35:00 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16313203#comment-16313203
] 

Phil Mueller commented on AXIS2-5832:
-------------------------------------

[~veithen]Can you please fix the ADBBeanTemplate-bean.xsl? The || Statement after the first
&& Statement must be packed into brackets.
Current: if(a && b || c) -> doesn't make sense
Fix:  if(a && (b || c))

Can't update axis because of this issue.

Thank you in advance.

> Missing Brackets in ADBBeanTemplate-bean.xsl
> --------------------------------------------
>
>                 Key: AXIS2-5832
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5832
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.7.2, 1.7.4
>            Reporter: Phil Mueller
>
> Line 2190 of ADBBeanTemplate-bean.xsl in 1.7.2
> {code}
> if (reader.isStartElement() <xsl:if test="$simple"> || reader.hasText()</xsl:if>
<xsl:if test="not($simple) and not($particleClassType)">&amp;&amp; <xsl:value-of
select="$propQName"/>.equals(reader.getName()) || <xsl:value-of select="$propQName2"/>.equals(reader.getName())
</xsl:if>){
> {code}
> must be changed to
> {code}
> if (reader.isStartElement() <xsl:if test="$simple"> || reader.hasText()</xsl:if>
<xsl:if test="not($simple) and not($particleClassType)">&amp;&amp; (<xsl:value-of
select="$propQName"/>.equals(reader.getName()) || <xsl:value-of select="$propQName2"/>.equals(reader.getName()))
</xsl:if>){
> {code}
> Because the generated Factory.parse method in the bean-source code
> {code}
> if (reader.isStartElement()
>                   && new javax.xml.namespace.QName("", "struct").equals(reader.getName())
>                         || new javax.xml.namespace.QName("", "struct").equals(reader.getName()))
> {code}
> runs in some cases into
> {code}
> java.lang.IllegalStateException: Current state is not among the states START_ELEMENT
, ATTRIBUTEvalid for getAttributeValue()
> 	at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.getAttributeValue(XMLStreamReaderImpl.java:819)
> 	at ise.service.wswdx.gen.WDXDataStruct$Factory.parse(WDXDataStruct.java:692)
> {code}
> This is the code with the xsl-changes
> {code}
> if (reader.isStartElement()
>                   && (new javax.xml.namespace.QName("", "struct").equals(reader.getName())
>                         || new javax.xml.namespace.QName("", "struct").equals(reader.getName())))
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message