axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-1121) binary and enumFacet are incompatible with unordered in ADBBeanTemplate
Date Thu, 07 Sep 2006 20:36:22 GMT
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message