All posts filed under: java

Spring Boot JAXB unable to marshal type error

comments 8
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-5f3735488f98e752207767/]