Closed MartinoMensio closed 7 years ago
this issue exists also on client side, both XML and JSON
This is due to the fact that global elements with named type have no correspondance to generated classes, because the generated class is for the named type.
If the global element has an anonymous type, the generated class is annotated with @XmlRootElement
.
This annotation makes the Entity provider to work with XML.
Currently the main issues are two:
link_t
needs to be extended by type policy
but needs to stay anonymous because the link element needs the @XMLRootElement
annotationCan create root elements by using the public JAXBElement<LinkT> createLink(LinkT value)
methods that create the element from the type Objects. In this way the two issues are avoided
If JAXBElement is used, XML clients works perfectly while JSON clients get strange objects. Better to have unnamed types
The service only produces JSON. When requesting XML, HTTP error 500 is thrown. In catalina log:
The cause of this problem is that the Entity provider for the generated types cannot be found. This is probably due to a missing library