Make Jibx unmarshallers laxer when dealing with unexpected tags in an incoming 
XML message
------------------------------------------------------------------------------------------

                 Key: JIBX-337
                 URL: http://jira.codehaus.org/browse/JIBX-337
             Project: JiBX
          Issue Type: Improvement
          Components: core
            Reporter: Guillaume CERNIER


According to the binding tutorial 
(http://jibx.sourceforge.net/binding/tutorial/binding-structures.html), if 
there are some tags in the XML message we want to ignore, they still have to be 
specified in the binding configuration (e.g. of the <instructions> tag in the 
<customer> tag at the end of the given tutorial webpage), whereas it may not be 
a mandatory tag in the XML (for example, according to the cardinality in a 
schema definition).

This is a problem for the following use case :
- an external provider of an XML message has added a tag (optional or not)
- new binding files and/or new code managing this new tag have not been 
redeployed
- but it should not be a problem because you don't need in the Java code the 
data inside this XML tag

So, the problem is that if the binding configuration file has not been modified 
to manage an useless XML tag, the binding conversion simply crashes when 
encounter such an unexpected XML tag.

I don't know which would be the effort to do some code changes to make the 
binding a bit laxer, from this point of view, but we think it could be a great 
improvement for all the Jibx users. Maybe this lax behaviour can also be set up 
for a complete binding configuration or just for a tag.
I could obviously be involved in realizing the changes, any information about 
where are the "key" parts of the code impacted is welcome.

Obviously, this kind of behaviour is only useful for unmarhsalling purpose 
since for marshalling Jibx would not know from any way how to add an XML tag if 
it is not specified in the binding.xml configuration file.
So such a feature still would be very interesting for software components whose 
incoming messages are different from the outcoming ones, which is the case of 
significant amount of current software components.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
jibx-devs mailing list
jibx-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to