The following table lists and describes the status-wise differences in JAXB operations.
Table A-7 Differences in JAXB operations (csmxjc command )
No. | Condition | Cosminexus XML Processor operations | |
---|---|---|---|
In version 08-50 | In version 08-70 and later versions | ||
1 | If the typesafeEnumClass custom binding exists in a simple XML schema document in which the enumeration facet does not exist | The csmxjc command terminates normally. | An error occurs indicating that the specification of the typesafeEnumClass custom binding is invalid. |
2 | When one of the following is satisfied:
| 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. |
3 | If the class custom binding is specified for the element element in a group element and that group element is referenced from other multiple types | 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 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. |
4 | If collectionType="indexed" is specified for globalBindings or property custom binding | The 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. |
5 | If the csmxjc command is executed when the factoryMethod custom binding is specified in the type definition or the anonymous type element definition | An error occurs. | Terminates normally. |
6 | If the source generated by the csmxjc command includes the @XmlElementRef annotation type# | The required element is not output. | The required element is output. |
7 | If the name element of the @XmlAttribute annotation type is the same as the field name to be generated | The name element is not output. | The name element is output. |
Table A-8 Differences in JAXB operations (csmschemagen command)
No. | Condition | Cosminexus XML Processor operations | |
---|---|---|---|
In version 08-50 | In version 08-70 and later versions | ||
1 | If @XmlAccessorOrder or @XmlAccessorOrder(XmlAccessOrder.UNDEFINED) is specified in the Java source | The 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. |
2 | If @XmlElementDecl is specified in the Java source | The 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. | Condition | Cosminexus XML Processor operations | |
---|---|---|---|
In version 08-50 | In version 08-70 and later versions | ||
1 | If 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 class | An IllegalAnnotationsException is thrown. | A NullPointerException is thrown. |
2 | If 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 type | The 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. |
3 | If an XML document that only contains blank text in the JavaBean property annotated by the @XmlMixed annotation type, is un-marshaled | The text object is not generated in the object generated by un-marshal. | A blank text object is generated. |
4 | In 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 value | An IllegalAccessError occurs. | Un-marshal processing terminates normally. |
5 | If the beforeUnmarshal method or afterUnmarshal method is implemented for the classes mapped to JAXB and if that method throws an exception during un-marshal | Un-marshal processing is interrupted. | An UnmarshalException is thrown and un-marshal processing is interrupted. |
6 | If null is specified in the first parameter of the newInstance(Class[], Map<String, ?>) method and newInstance(Class[]) method for the JAXBContext class | A NullPointerException is thrown. | An IllegalArgumentException is thrown. |
7 | If a value other than 0, 1, false, and true is specified in the parseBoolean method for the DatatypeConverter class | false is returned. | An IllegalArgumentException is thrown. |
8 | If you specify only a space in the parseDecimal method for the DatatypeConverter class | java.lang.NumberFormatException is thrown. | An exception is thrown. |
9 | If the value to be un-marshaled in the enum class contains a linefeed or a space | The processing result is invalid. | The value is un-marshaled correctly. |