You probably can. But that only presents a restriction... the xsd could tell you if the message is valid. But the xsd has little meaning once you have de-serialized the object.
Then the object itself would have to communicate what valid choices are. The Enum is an example of this, so is the String[] getNames() method I mentioned. On Thu, 2003-02-06 at 19:24, Dmitri Colebatch wrote: > > However, since you do not have control over the client side, you will > > never really be able to restrict what values they pass. You can > > "suggest it". But that in itself is totally separate from the JavaBean > > construct. JavaBeans (and the JDK proper) has no real type-safe enum > > construct (hence the reference to Jakara Commons above). > > can you not restrict this at the xsd level? I haven't had the requirement > myself, but I would find it hard to believe that its not possible. > > cheers > dim >