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] Commented: (AXIS2-1121) binary and enumFacet are incompatible with unordered in ADBBeanTemplate
Date Thu, 07 Sep 2006 20:38:22 GMT
    [ http://issues.apache.org/jira/browse/AXIS2-1121?page=comments#action_12433224 ] 
            
Davanum Srinivas commented on AXIS2-1121:
-----------------------------------------

Thanks Dims.  I'm trying a build now.  It takes a long time from here
due to all the maven library access delays (I already tried offline,
which failed hopefully only because a new library is requried).

The problems I've noted with the template remain.  In the unordered case
the code inserts binary (or enumFacet) code into a looping structure
that looks for each property in any order.  Each iteration of the loop
must check to see what property it is at and then load that value using
whatever method is correct.  The code structure of the loop presumes
that each such property-loading code segment is an single if statement
that can be preceded by an "else" as there is no need to continue
checking properties in a single iteration once one is found.  However,
the code generated for binary and enumFacet properties satisfies neither
of these criteria.  This code does not check to see if it is at the
property it loads and it is not in the form of an if.  This causes
invalid code to be generated.  The binary and and enumFacet generated
code will only work in an ordered context.

With a binary MTOM property is it still possible to validate the
property by checking the name of the start element?  If so, my fix
(which just backs out 434331 and 436663) will work.  If not, then some
other test needs to be devised if binary attributes are to work in an
unordered context.

I'd be happy to fix if you could answer that question.

Thanks,

Chuck

> 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