Uploaded image for project: 'JBoss ESB'
  1. JBoss ESB
  2. JBESB-3942

OGNLUtils.assertIsCollection() incorrectly interprets "Zero or more repetitions" comments in front of non-repeatable field

    XMLWordPrintable

    Details

      Description

      Description of problem:

      • Suppose you have a long WSDL document and only set one single parameter in the request map using OGNL, such as:
        requestMap.put("mutiereGeschaeft.geschaeft.Kredit.KreStatus", "ssss");
      • WSDL snippet:
        <xs:element name='KreStatus' nillable='true' type='xs:string'/>
      • Generated Request - without parameters filed:
        <!-Zero or more repetitions: - cloned->

      <java1:KreStatus>?</java1:KreStatus>

      • org.jboss.internal.soa.esb.soap.OGNLUtils.assertIsCollection() checks for this:
        if(commentBefore != null
        && (commentBefore.getTextContent().endsWith(SOAPUI_CLONE_COMMENT)
        commentBefore.getTextContent().endsWith(SOAPUI_CLONE_COMMENT + CLONED_POSTFIX))) { return true; }

      which is true and this causes this parameter to not be filled at all. If
      mutiereGeschaeft.geschaeft.Kredit.KreStatus[0] is used, the parameter will be correctly filled.

      We need to make sure that assertIsCollection(), possibly assertIsParentCollection() also checks if the element can be repeated, or somehow else make sure that we actually have repeated the element and not some other elements.

      Version-Release number of selected component (if applicable):

      • JBoss SOA-P 5.3.1

      How reproducible:
      Always

      Steps to Reproduce:
      1. Using attached modified quickstart

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tcunning Thomas Cunningham
                Reporter:
                tcunning Thomas Cunningham
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: