https://redmine.dataone.org/https://redmine.dataone.org/favicon.ico2016-06-24T19:12:26ZDataONE TasksInfrastructure - Story #7832: migrate from JibX to JAXB for XML binding / codegenhttps://redmine.dataone.org/issues/7832?journal_id=278272016-06-24T19:12:26ZRob Nahfrnahf@epscor.unm.edu
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/7282">Bug #7282</a>: Can't build d1_common_java under java 1.8</i> added</li></ul> Infrastructure - Story #7832: migrate from JibX to JAXB for XML binding / codegenhttps://redmine.dataone.org/issues/7832?journal_id=278362016-06-27T22:16:43ZRob Nahfrnahf@epscor.unm.edu
<ul></ul><p>basic marshalling will create an empty type (no values set) that we've determined is problematic when unmarshalling, for example:</p>
<p><?xml version="1.0" encoding="UTF-8" standalone="yes"?></p>
<p>if using schema code generation, we would have to add special handling to get desired behavior (throwing an exception).</p>
<p>(see <a class="issue tracker-5 status-5 priority-4 priority-default closed child" title="Task: JibX generated classes need additional logic to prohibit empty elements (Closed)" href="https://redmine.dataone.org/issues/7745">#7745</a>)</p>
Infrastructure - Story #7832: migrate from JibX to JAXB for XML binding / codegenhttps://redmine.dataone.org/issues/7832?journal_id=278372016-06-28T17:00:24ZRob Nahfrnahf@epscor.unm.edu
<ul></ul><p>standard xjc annotations are not getting all of the properties in our classes from the schema, for example, Checksum is only catching the "value" field, not the "algorithm" field.</p>
Infrastructure - Story #7832: migrate from JibX to JAXB for XML binding / codegenhttps://redmine.dataone.org/issues/7832?journal_id=278402016-06-28T23:47:50ZRob Nahfrnahf@epscor.unm.edu
<ul></ul><p>xjc did not generate classes for 4 types in dataoneTypes.xsd:</p>
<p>1) ObjectFormatIdentifier<br>
2) MonitorInfo<br>
3) MonitorList<br>
4) DescribeResponse</p>
<p>Were these ever JiBX code generated?</p>
<p>ObjectFormatIDentifier could probably be because it was declared a simpleType instead of a complexType. (Or could it be that the class name is so looooooooong. :-) )</p>
Infrastructure - Story #7832: migrate from JibX to JAXB for XML binding / codegenhttps://redmine.dataone.org/issues/7832?journal_id=278412016-06-29T05:20:18ZRob Nahfrnahf@epscor.unm.edu
<ul></ul><p>Was able to get the TypeMarshallerTestCase to pass on a JAXB-based TypeMarshaller class (refactored from the JiBX-based on in d1_common_java), and with JAXB annotated copies of existing service.type classes.</p>
<ul>
<li>need to make sure package-info.java is in the types package</li>
<li>need to make sure the @XMLRootElement(name = "lowerCaseClassName")</li>
<li>make sure the List element properties use the un-list name for the property, i.e.: List subject, instead of List<Subject subjectList</li>
</ul>
<p>Still need to adapt all of the types with XMLAnnotations...<br>
Still need to verify that Dates marshall correctly<br>
Still need to verify that lists become lists...</p>
Infrastructure - Story #7832: migrate from JibX to JAXB for XML binding / codegenhttps://redmine.dataone.org/issues/7832?journal_id=280112016-08-18T21:47:23ZRob Nahfrnahf@epscor.unm.edu
<ul></ul><p>Finished conversion from JibX to JAXB, using only a cache for the marshalling contexts as recommended. Caching the Marshallers and unmarsahllers themselves was tested, but didn't lead to a performance gain, so that code was removed. (The complication of adding ThreadLocals to make the TypeMarshaller thread safe was the primary consideration against leaving it in.</p>
<p>Removed JibX and BCEL configurations from pom.xml, as well as d1-jibx-extensions as a project dependency.</p>
Infrastructure - Story #7832: migrate from JibX to JAXB for XML binding / codegenhttps://redmine.dataone.org/issues/7832?journal_id=295382018-01-17T19:06:27ZDave Vieglaisdave.vieglais@gmail.com
<ul><li><strong>Sprint</strong> set to <i>CCI-2.3.8</i></li></ul> Infrastructure - Story #7832: migrate from JibX to JAXB for XML binding / codegenhttps://redmine.dataone.org/issues/7832?journal_id=295392018-01-17T19:06:35ZDave Vieglaisdave.vieglais@gmail.com
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>30</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul>