[esb-issues] [JBoss JIRA] Closed: (JBESB-2574) OGNLUtils.assertIsCollection fails

Magesh Kumar B (JIRA) jira-events at lists.jboss.org
Wed May 26 08:43:55 EDT 2010


     [ https://jira.jboss.org/browse/JBESB-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Magesh Kumar B closed JBESB-2574.
---------------------------------

    Resolution: Done


trunk: 33090

> OGNLUtils.assertIsCollection fails
> ----------------------------------
>
>                 Key: JBESB-2574
>                 URL: https://jira.jboss.org/browse/JBESB-2574
>             Project: JBoss ESB
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Rosetta
>    Affects Versions: 4.5
>            Reporter: jarkko Lietolahti
>            Assignee: Magesh Kumar B
>             Fix For: 4.9
>
>
> The method 
> {code}
>     private static boolean assertIsCollection(Element element) {
>         if(element.getAttributeNS(JBOSSESB_SOAP_NS, IS_COLLECTION_ATTRIB).equals("true")) {
>             // It's already been attributed... no need to check for the soapui comment...
>             return true;
>         }
>         Comment firstComment = (Comment) YADOMUtil.getFirstChildByType(element, Node.COMMENT_NODE);
>         // TODO: Get Ole (soapUI) to add an attribute to the collection element - better than looking for this comment.
>         if(firstComment != null && firstComment.getTextContent().indexOf("1 or more repetitions") != -1) {
>             return true;
>         }
>         return false;
>     }
> {code}
> Especially row;
>   Comment firstComment = (Comment) YADOMUtil.getFirstChildByType(element, Node.COMMENT_NODE);
> is causing a grief.
> Given an WSDL like below;
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
>    <soapenv:Header/>
>    <soapenv:Body>
>       <QueryRequest>
>          <username>?</username>
>          <password>?</password>
>          <Customer id="?" telcoid="?"/>
>          <!--1 or more repetitions:-->
>          <productIds>?</productIds>
>          <isLookup>?</isLookup>
>          <maxWaitTime>?</maxWaitTime>
>       </QueryRequest>
>    </soapenv:Body>
> </soapenv:Envelope>
> OGNLUtils creates ognlExpression QueryRequest[0] for all the elements below QueryRequest. E.g. ognl for username, password etc is "QueryRequest[0]" for username and also "QueryRequest[0]" for password, when in reality it should be QueryRequest.username , QueryRequest.password etc..
> This is caused by the array element LATER in the WSDL;
>  <!--1 or more repetitions:-->
>  <productIds>?</productIds>
> combined with the  Comment firstComment = (Comment) YADOMUtil.getFirstChildByType(element, Node.COMMENT_NODE); which somehow finds the "<!-- 1 or .." later in the wsdl. 
> I think.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the esb-issues mailing list