Appendix A.6 Differences in the JAXB operation

The following table lists and describes the status-wise differences in JAXB operations.

Table A-7 Differences in JAXB operations (csmxjc command )

No.ConditionCosminexus XML Processor operations
In version 08-50In version 08-70 and later versions
1If the typesafeEnumClass custom binding exists in a simple XML schema document in which the enumeration facet does not existThe csmxjc command terminates normally.An error occurs indicating that the specification of the typesafeEnumClass custom binding is invalid.
2When one of the following is satisfied:
  • If generateElementClass="true" or generateElementClass="1" is specified in the globalBindings custom binding
  • If class custom binding is specified in the element element of the XML schema document
The reference property of the element class is annotated by using a data type of the element (@XmlElement or @XmlElements).
Note that the default constructor is not output to the source corresponding to that element.
The reference property of the element class is annotated by using a class type of the element (@XmlElementRef or @XmlElementRefs).
The default constructor is output.
3If the class custom binding is specified for the element element in a group element and that group element is referenced from other multiple typesAmong the element elements in the group element, the factory method that creates the objects of the elements not specifying the class custom binding is not generated.Among the element elements in the group element, the factory method that creates the objects of the elements not specifying the class custom binding is generated.
4If collectionType="indexed" is specified for globalBindings or property custom bindingThe type for the element element of the source generated by the csmxjc command is java.util.List.The type for the element element of the source generated by the csmxjc command is an array.
5If the csmxjc command is executed when the factoryMethod custom binding is specified in the type definition or the anonymous type element definitionAn error occurs.Terminates normally.
6If the source generated by the csmxjc command includes the @XmlElementRef annotation type#The required element is not output.The required element is output.
7If the name element of the @XmlAttribute annotation type is the same as the field name to be generatedThe name element is not output.The name element is output.
#
The required element of the @XmlElementRef annotation type is now supported in JAXB 2.2.

Table A-8 Differences in JAXB operations (csmschemagen command)

No.ConditionCosminexus XML Processor operations
In version 08-50In version 08-70 and later versions
1If @XmlAccessorOrder or @XmlAccessorOrder(XmlAccessOrder.UNDEFINED) is specified in the Java sourceThe XML schema document created by the csmschemagen command becomes the sequence element.The XML schema document created by the csmschemagen command becomes the all element.
2If @XmlElementDecl is specified in the Java sourceThe nillable="true" attribute is output to the element element of the global definition for the XML schema document generated by the csmschemagen command.The nillable="true" attribute is not output to the element element of the global definition for the XML schema document generated by the csmschemagen command.

Table A-9 Differences in JAXB operations (Runtime)

No.ConditionCosminexus XML Processor operations
In version 08-50In version 08-70 and later versions
1If a class containing variables of the java.lang.Object type annotated by the @XmlAttribute or @XmlValue annotation types, or a package name containing that class, is specified in the newInstance method for the JAXBContext classAn IllegalAnnotationsException is thrown.A NullPointerException is thrown.
2If the package-info class exists in the package specified in the newInstance method for the JAXBContext class, and if the namespace is specified by using the XmlNs annotation typeThe namespace declaration is not output to the XML document that is output with marshal.The namespace declaration is output to the XML document that is output with marshal.
3If an XML document that only contains blank text in the JavaBean property annotated by the @XmlMixed annotation type, is un-marshaledThe text object is not generated in the object generated by un-marshal.A blank text object is generated.
4In a schema validation or event handler, if an Unmarshaller that does not check errors is used to un-marshal a character string for a JavaBean property with a primitive type numeric valueAn IllegalAccessError occurs.Un-marshal processing terminates normally.
5If the beforeUnmarshal method or afterUnmarshal method is implemented for the classes mapped to JAXB and if that method throws an exception during un-marshalUn-marshal processing is interrupted.An UnmarshalException is thrown and un-marshal processing is interrupted.
6If null is specified in the first parameter of the newInstance(Class[], Map<String, ?>) method and newInstance(Class[]) method for the JAXBContext classA NullPointerException is thrown.An IllegalArgumentException is thrown.
7If a value other than 0, 1, false, and true is specified in the parseBoolean method for the DatatypeConverter classfalse is returned.An IllegalArgumentException is thrown.
8If you specify only a space in the parseDecimal method for the DatatypeConverter classjava.lang.NumberFormatException is thrown.An exception is thrown.
9If the value to be un-marshaled in the enum class contains a linefeed or a spaceThe processing result is invalid.The value is un-marshaled correctly.