You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Scott Kurz (JIRA)" <de...@tuscany.apache.org> on 2011/03/30 16:56:05 UTC

[jira] [Created] (TUSCANY-3857) unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data

unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data
---------------------------------------------------------------------------------------------------

                 Key: TUSCANY-3857
                 URL: https://issues.apache.org/jira/browse/TUSCANY-3857
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Axis Binding Extension, Java SCA Databinding-SDO
            Reporter: Scott Kurz
            Priority: Minor


In r1086760, I committed a change to OMElementWrapperHandler.getChildren so that it could handle unwrapping a wrapper with "missing" children, i.e. children with schema def of minOccurs="0" which aren't present as a child of the wrapper.

The code we had would, after not finding a child of given QName, group the wrapper children into like-QName-elements and then allow indexing into this list of groups.  

This would prevent the next wrapper child from matching normally in the minOccurs="0" case, so I removed that logic.

However, now I've broken our handling of schema-invalid payloads, as seen in the module:
testing\itest\ws\endpoint-references

Will have to think about how to handle both cases.

I don't recall us talking about it in awhile, but I think the handling of XSD-invalid data is a significant feature of Tuscany that we should try not to break. 



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TUSCANY-3857) unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data

Posted by "Scott Kurz (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014033#comment-13014033 ] 

Scott Kurz commented on TUSCANY-3857:
-------------------------------------

In r1087339, I reverted the OMElementWrapperHandler behavior to keep the itest passing.

> unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data
> ---------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3857
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3857
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Axis Binding Extension, Java SCA Databinding-SDO
>            Reporter: Scott Kurz
>            Priority: Minor
>
> In r1086760, I committed a change to OMElementWrapperHandler.getChildren so that it could handle unwrapping a wrapper with "missing" children, i.e. children with schema def of minOccurs="0" which aren't present as a child of the wrapper.
> The code we had would, after not finding a child of given QName, group the wrapper children into like-QName-elements and then allow indexing into this list of groups.  
> This would prevent the next wrapper child from matching normally in the minOccurs="0" case, so I removed that logic.
> However, now I've broken our handling of schema-invalid payloads, as seen in the module:
> testing\itest\ws\endpoint-references
> Will have to think about how to handle both cases.
> I don't recall us talking about it in awhile, but I think the handling of XSD-invalid data is a significant feature of Tuscany that we should try not to break. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (TUSCANY-3857) unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data

Posted by "Scott Kurz (Closed) (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Kurz closed TUSCANY-3857.
-------------------------------

    Resolution: Fixed
    
> unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data
> ---------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3857
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3857
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Axis Binding Extension, Java SCA Databinding-SDO
>            Reporter: Scott Kurz
>            Priority: Minor
>             Fix For: Java-SCA-2.x
>
>
> In r1086760, I committed a change to OMElementWrapperHandler.getChildren so that it could handle unwrapping a wrapper with "missing" children, i.e. children with schema def of minOccurs="0" which aren't present as a child of the wrapper.
> The code we had would, after not finding a child of given QName, group the wrapper children into like-QName-elements and then allow indexing into this list of groups.  
> This would prevent the next wrapper child from matching normally in the minOccurs="0" case, so I removed that logic.
> However, now I've broken our handling of schema-invalid payloads, as seen in the module:
> testing\itest\ws\endpoint-references
> Will have to think about how to handle both cases.
> I don't recall us talking about it in awhile, but I think the handling of XSD-invalid data is a significant feature of Tuscany that we should try not to break. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TUSCANY-3857) unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data

Posted by "ant elder (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ant elder updated TUSCANY-3857:
-------------------------------

    Fix Version/s: Java-SCA-2.x

> unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data
> ---------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3857
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3857
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Axis Binding Extension, Java SCA Databinding-SDO
>            Reporter: Scott Kurz
>            Priority: Minor
>             Fix For: Java-SCA-2.x
>
>
> In r1086760, I committed a change to OMElementWrapperHandler.getChildren so that it could handle unwrapping a wrapper with "missing" children, i.e. children with schema def of minOccurs="0" which aren't present as a child of the wrapper.
> The code we had would, after not finding a child of given QName, group the wrapper children into like-QName-elements and then allow indexing into this list of groups.  
> This would prevent the next wrapper child from matching normally in the minOccurs="0" case, so I removed that logic.
> However, now I've broken our handling of schema-invalid payloads, as seen in the module:
> testing\itest\ws\endpoint-references
> Will have to think about how to handle both cases.
> I don't recall us talking about it in awhile, but I think the handling of XSD-invalid data is a significant feature of Tuscany that we should try not to break. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TUSCANY-3857) unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data

Posted by "Scott Kurz (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030925#comment-13030925 ] 

Scott Kurz commented on TUSCANY-3857:
-------------------------------------

One more note... I did take a quick look at the DOMWrapperHandler in implementing this, and saw that this handler lacks a lot of the function of the AXIOM one.   Rather than open a vague JIRA I'll try to find some time to follow up on the specific issues.

I wonder if it's worth factoring out some of the logic to a databinding-neutral place.. if it's going to be this complicated.

> unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data
> ---------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3857
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3857
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Axis Binding Extension, Java SCA Databinding-SDO
>            Reporter: Scott Kurz
>            Priority: Minor
>
> In r1086760, I committed a change to OMElementWrapperHandler.getChildren so that it could handle unwrapping a wrapper with "missing" children, i.e. children with schema def of minOccurs="0" which aren't present as a child of the wrapper.
> The code we had would, after not finding a child of given QName, group the wrapper children into like-QName-elements and then allow indexing into this list of groups.  
> This would prevent the next wrapper child from matching normally in the minOccurs="0" case, so I removed that logic.
> However, now I've broken our handling of schema-invalid payloads, as seen in the module:
> testing\itest\ws\endpoint-references
> Will have to think about how to handle both cases.
> I don't recall us talking about it in awhile, but I think the handling of XSD-invalid data is a significant feature of Tuscany that we should try not to break. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TUSCANY-3857) unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data

Posted by "Scott Kurz (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030923#comment-13030923 ] 

Scott Kurz commented on TUSCANY-3857:
-------------------------------------

In r1101239, I committed a fix for this.   It first tries to use the wrapper element's schema to guide the unwrapping.  If this fails, (most likely because of an operation wrapper child not present in the payload wrapper), then we revert to unwrapping by groups of similar elements.   

To do this, I introduced a new boolean:  isOmissible, which in schema terms is true if "minOccurs=0"

The net result continues to support invalid elements (e.g. in the case where we have a Java that's similar to an existing WSDL but not actually generated from it).    Though a side effect of this change is that I validate multiple consecutive child elements against the schema (i.e. ensure that the corresponding ElementInfo isMany is "true").. there's probably a payload out there for which the behavior is different then but I'm not giving it any more thought.

Finally... on the wrap path (not mentioned in my original problem writeup), I added some code which will simply omit writing a null element into the wrapper in case nillable="false", i.e. I prefer to wrap 'null' as xsi:nil="true" but will also simply not write anything into the wrapper.   Though it may seem more symmetric to look at the isOmissible flag in this case, I couldn't see making the behavior any different after doing so, so didn't.

> unwrapping OMElementWrapperHandler can't easily tolerate both non-valid data and minOccurs="0" data
> ---------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3857
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3857
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Axis Binding Extension, Java SCA Databinding-SDO
>            Reporter: Scott Kurz
>            Priority: Minor
>
> In r1086760, I committed a change to OMElementWrapperHandler.getChildren so that it could handle unwrapping a wrapper with "missing" children, i.e. children with schema def of minOccurs="0" which aren't present as a child of the wrapper.
> The code we had would, after not finding a child of given QName, group the wrapper children into like-QName-elements and then allow indexing into this list of groups.  
> This would prevent the next wrapper child from matching normally in the minOccurs="0" case, so I removed that logic.
> However, now I've broken our handling of schema-invalid payloads, as seen in the module:
> testing\itest\ws\endpoint-references
> Will have to think about how to handle both cases.
> I don't recall us talking about it in awhile, but I think the handling of XSD-invalid data is a significant feature of Tuscany that we should try not to break. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira