[ http://issues.apache.org/jira/browse/AXIS2-1121?page=comments#action_12433257 ] Chuck Williams commented on AXIS2-1121: ---------------------------------------
Dims, Thanks for making this update. I still have not managed to get a successful build (last attempt failed tests in the security scenarios due to check-ins today), but have reviewed the changes to the template. I see that you explicitly did not check for being at the right property in the unordered case (omitted the test of the start element name) and so presume that for some reason this is not possible. This means the binary property code will be evaluated on every iteration of the loop for any container with at least one binary property. I don't see how this could work. In the sforce wsdl that failed yesterday, it has an unordered type with both binary and non-binary properties. The unordered property parsing loop can only work if it can detect when it has reached the binary property. If the start element name cannot be used for this, is there some other test that can? I wrote the portions of the template that pertain to the unordered case and understand it well, but I don't understand MTOM fully. I've read the spec and don't see why testing the start element name cannot be done. If you could explain how to test that the binary property has been reached I could fix the the template. > binary and enumFacet are incompatible with unordered in ADBBeanTemplate > ----------------------------------------------------------------------- > > Key: AXIS2-1121 > URL: http://issues.apache.org/jira/browse/AXIS2-1121 > Project: Apache Axis 2.0 (Axis2) > Issue Type: Bug > Reporter: Davanum Srinivas > > Hi Dims and Ajith, > I believe you guys added revisions 434331 and 436663 as part of a fix > for Axis2-1065. Unfortunately these changes break the build and the > template. E.g., the sforce enterprise wsdl generates bogus code and > kills a clean build. > Simply backing out the changes in these two revisions causes the build > to succeed and all tests to pass. However, I suspect this will regress > Axis2-1065 and the same type of problem exists for enumFacet. > The issue is this. For ordered property sets, the main property parsing > loop generates code like this (in pseudo-code notation): > if (elementName=="name1") { > ... > } else throw "Unexpected subelement" > if (elementName=="name2") { > ... > } else throw "Unexpected subelement" > ... > While in the unordered case the same code looks like this: > while (!endElement) { > if (elementName=="name1") { > ... > } > else if (elementName=="name2") { > ... > } > ... > } > The binary MTOM code that was added fills the role of one the embedded > if's but is not of the same form, not an if at all. This code works in > the first ordered case, but in the second unordered case it doesn't work > at all to have fixed code expecting to just read a binary value where > one of the if's is supposed to be. Also in the binary case in the > current template the else is still generated after the MTOM code that is > not an if, whence the syntax violation in the code generated for the > sforce wsdl, which evidently has a binary property in an unordered > property set. > I'm no expert on MTOM. Can't you still test that you've got the right > property (the binary property) by using the start-element name? For the > template to work in the unordered case, some test that you've got the > binary propery is essential. The existing template does not do this, > which can only work in the ordered case where you know you are at the > right position, and even in this case does not do the proper error > checking to verify this. > I would commit the attached template as axis2 passes all tests, but the > logs indicate you made the revisions that created this problem to fix > another problem and so I don't want to just back that out without > bringing this to your attention first. > Chuck -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
