Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5832

Missing Brackets in ADBBeanTemplate-bean.xsl

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.7.2, 1.7.4
    • Fix Version/s: None
    • Component/s: adb
    • Labels:
      None

      Description

      Line 2190 of ADBBeanTemplate-bean.xsl in 1.7.2

      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>){
      

      must be changed to

      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>){
      

      Because the generated Factory.parse method in the bean-source code

      if (reader.isStartElement()
                        && new javax.xml.namespace.QName("", "struct").equals(reader.getName())
                              || new javax.xml.namespace.QName("", "struct").equals(reader.getName()))
      

      runs in some cases into

      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)
      

      This is the code with the xsl-changes

      if (reader.isStartElement()
                        && (new javax.xml.namespace.QName("", "struct").equals(reader.getName())
                              || new javax.xml.namespace.QName("", "struct").equals(reader.getName())))
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ise-mueller Phil Mueller
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: