]
Kevin Conner updated JBESB-3453:
--------------------------------
Fix Version/s: 4.7 CP3
(was: 4.9)
OGNLUtils.assertIsCollection fails
----------------------------------
Key: JBESB-3453
URL:
https://jira.jboss.org/browse/JBESB-3453
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.7 CP3
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: