I did a REST wrapper for some SOAP services. Now I want to add HATEOAS support but, for the resources I use the auto created classes with the maven-jaxb2-plugin
library. For example the auto generated class BookDetails
:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "BookDetails", propOrder = {
"id",
"name",
"title",
"author"
})
public class BookDetails {
@XmlElement(required = true)
protected String id;>
...
}
I cannot extend that class from ResourceSupport
because if the .wsdl
change the BookDetails
class is recreated and overwrite. Also if a created a new class that extends from BookDetails
like BookDetailsResource
then I cannot extend from ResourceSupport
. Any idea or previous problem similar?
Here is a tutorial on how to create the wrapper if someone needs to implement it. https://howtodoinjava.com/spring/spring-boot/spring-soap-client-webservicetemplate/