Hi all I've successfully used JAXB on my own simple schemas and to go from
Java to XML. Recently I attempted to deal with some schemas from
http://www.optimizationservices.org/ These relate to formulating
optimization (mathematical) problems into XML for farming out to a server.
After dealing with some name collisions (mathematicians like to use short
non-Java compliant names, like N and n) got their OSiL (Optimization
Services Instance Language) schema through XJC (the version that comes with
Netbeans 6.1RC2).
Unfortunately, I then got Java compile errors for a missing symbol in a
bunch of the generated get methods:
public double getUb() {
if (ub == null) {
return InfinityD; <--- should be Double.POSITIVE_INFINITY;
} else {
return ub;
}
}
XML Schema permit both INF (positive infinity) and -INF (negative infinity)
but these don't seem to be getting mapped correctly to the Java (the INF and
-INF values occur as defaults on a number of attributes in the Schema).
Anyone else see this? Is this a bug (or a feature)? Any work around?
Thanks
Greg B.
--
View this message in context: http://www.nabble.com/Problem-with-code-generation-for-double-%28floating-point-numbers%29-tp16834879p16834879.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.