[JBoss JIRA] Created: (JBESB-2574) OGNLUtils.assertIsCollection fails
by jarkko Lietolahti (JIRA)
OGNLUtils.assertIsCollection fails
----------------------------------
Key: JBESB-2574
URL: https://jira.jboss.org/jira/browse/JBESB-2574
Project: JBoss ESB
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.5
Reporter: jarkko Lietolahti
The method
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;
}
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="?">
</Customer>
<!--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]" when in reality it should be QueryRequest.username , QueryRequest.password etc..
This is caused by the array element LATER in the WSDL;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira