Skip to main content

java.lang.UUID and JAX-B 2.0

1 reply [Last post]
Joined: 2004-04-01

Looking at page 223 of the specs for JAXB 2.0, the standard Java types which are mapped to XML data types, I do not see how UUID will be mapped. It could be just fine, I just wanted to make sure this is no an accidental omission by the experts group.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-09

The JAXB spec doesn't talk about how String/Integer/... are mapped in XML, either. They are just implied. That's probably why you don't see it for UUID, either.

I believe the natural reading would be to use UUID.fromString() and UUID.toString().