You are missing my point.

You have something like

  | <known-schema:value><random-schema1:x/></known-schema:value>
  | <known-schema:value><random-schema2:x/></known-schema:value>
  | 

Now known-schema:value can take any object from the ANY that is constructed
from the one of the random-schemas.

known-schema:value maps to

  | public class MyValue
  | {
  |    public Object getValue();
  |    public void setValue(Object value);
  | }
  | 

We then tell it to marshall MyValue back to XML, we know this should be
done with known-schema, but what happens when it hits getValue()?
How does it know which of the random-schemas to use?
The information has been lost after the xml is parsed.

My solution was to have something like:

  | public class XMLMyValue extends MyValue implements XMLAnyTarget
  | {
  |    public String getAnySchema();
  |    public void setAnySchema(String schema);
  | }
  | 

where setAnySchema was invoked during the unmarshalling
and getAnySchema can be used when we want to remarshall.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3871181#3871181

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3871181


-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to