- Dennis
Guillaume Pothier wrote:
I have an element defined as follows: <xs:complexType name="TType"> <xs:choice> <xs:element name="primitiveType" type="TPrimitiveType"/> <xs:element name="dataType" type="TDataType"/> <xs:element name="activityType" type="TActivityType"/> (...) </xs:choice> </xs:complexType>
Other binding frameworks (JAXB, and from what I understood a a previous post in this list, Castor as well) usually generate classes with a structure like this:
class Type
{
private PrimitiveType itsPrimitiveType;
private DataType itsDataType;
private ActivityType itsActivityType;
(...)
}
with only one of these fields having a non-null value.
But I have a class like this: class Type { private TypeStrategy itsStrategy; }
PrimitiveType, DataType and ActivityType... implementing TypeStrategy.
I did not find a way to define a mapping for this kind of element. Right now, I am solving it with a custom marshaller/unmarshaller. This is not complicated at all, but I would prefer to avoid that.
Did I miss something and is there already a way to define such a binding in xml?
Or is it planned to support that kind of bindings?
Guillaume
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users
-- Dennis M. Sosnoski Enterprise Java, XML, and Web Services Training and Consulting http://www.sosnoski.com Redmond, WA 425.885.7197
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users
