All posts filed under: java

Spring Boot JAXB unable to marshal type error

java / programming

Working with a SOAP API with Spring Boot WS. I was getting the following error trying to create the request. I was originally directly using the JAXB generated classes to form my requests: The correct way is to use the provided JAXB ObjectFactory: But to prevent marshalling errors you need to wrap your object in a JAXBElement object: [crayon-5f936b4ad4942838303252/]