Opened 11 years ago

Closed 11 years ago

#348 closed defect (fixed)

The ObjectFactory in the Jaxb generated classes fail to include a getter for notebooks and maybe others.

Reported by: peterwithers Owned by: olhsha
Priority: major Milestone: DASISH backend
Component: DASISH backend Version:
Keywords: Cc: olhsha

Description

It looks like there might be some namespace pollution or some other anomaly that causes the jaxb auto generated classes to omit the getter for notebooks from the ObjectFactory?. This is an issue when a jaxb root node is required, such as in the rest interface. A work around has been added which makes it clear where the issue is and why the ObjectFactory? is required, but this needs to be replaced when the schema is updated.

Change History (5)

comment:1 Changed 11 years ago by DefaultCC Plugin

Cc: olhsha added

comment:2 Changed 11 years ago by peterwithers

[3191]

refs #348
Added temporary creation of JAXBElement in the unit test to make it clear where the jaxb root node issues stem from. This should be removed and replaced by the same as returned by the ObjectFactory? when cause of it not being auto generated is resolved.

comment:3 Changed 11 years ago by olhsha

The current hypothesis is that JAXB get confused by plural forms used in the schema in type names for lists of resources, e.g. Annotation --> Annotations, Notebook --> Notebooks etc. Replace plural forms with other wording and check if it fixes the problem.

comment:4 Changed 11 years ago by olhsha

Stephanie&Olof: the plural forms can - and should - be replaced more or less immediately, e.g. by adding the suffix "List" or "Collection" instead of plural "s". For instance, the serialized xml output could then match the following snippet

<annotationCollection>  
   <annotation>
      <!-- elements of annotation -->
   </annotation>
</annotationCollection>

Speaking of diverse "JAXB plural issues", there were some hints on the web regarding (inline and external) Java binding customization for JAXB, - it might be that this would also be a viable solution approach. Maybe this thread is worth checking as well: http://stackoverflow.com/questions/11943487/please-advise-the-best-pattern-for-serialising-jaxb-lists.

comment:5 Changed 11 years ago by olhsha

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.