Affects: Spring Boot 2.5.6
When implementing SOAP consumer with usage of WebServiceGatewaySupport Jaxb2Marshaller is setup like below:
@Bean
@SneakyThrows
public Jaxb2Marshaller marshaller() {
final var marshaller = new Jaxb2Marshaller();
marshaller.setPackagesToScan(SCHEMAS_PATH);
marshaller.setMarshallerProperties(Map.of(
Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.FALSE,
Marshaller.JAXB_ENCODING, "UTF-8",
"com.sun.xml.bind.marshaller.CharacterEscapeHandler", new NoEscapeHandler()));
return marshaller;
}
Marshalled object contains XML as String inside which should be not escaped, but when the request is serialised EscapeHandler is not used and some data are escaped (in this case should not)
Comment From: snicoll
@jabednarski thanks for the report but this is the wrong issue tracker to report something against Spring Web Services. The issue tracker for the project is https://github.com/spring-projects/spring-ws. Before reporting that there, please create a small sample that the team can run to reproduce what you have described.