users@jaxb.java.net

Fwd: xsd:union serializable issue

From: Malachi de AElfweald <malachi_at_eoti.org>
Date: Wed, 13 Aug 2003 11:54:52 -0700

------- Forwarded message -------
From: Malachi de AElfweald <malachi_at_EOTI.ORG>
To: JAXB-INTEREST_at_JAVA.SUN.COM
Subject: xsd:union serializable issue
Date: Wed, 6 Aug 2003 12:07:07 -0600

> I have the following snippet in my schema:
>
> <xsd:simpleType name="sizeType">
> <xsd:union>
> <xsd:simpleType>
> <xsd:restriction base="xsd:int"/>
> </xsd:simpleType>
> <xsd:simpleType>
> <xsd:restriction base="xsd:NCName">
> <xsd:enumeration value="MIN"/>
> <xsd:enumeration value="MAX"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:union>
> </xsd:simpleType>
>
> The autogenerated classes return Serializable as the type, instead of
> something useful:
>
> getHeight
> public Serializable getHeight()
> Returns:
> possible object is intString
>
> setHeight
> public void setHeight(Serializable value)
> Parameters:
> value - allowed object is intString
>
>
> Any ideas? Basically, I want to get either an int or some constant to
> identify their choice.
>
> Malachi
>
>



-- 
 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net