Phil Mueller created AXIS2-5832:
-----------------------------------
Summary: 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.4, 1.7.2
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)">&& <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)">&& (<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.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]