Henrik Walland Lund Henrik Walland Lund - 5 months ago 84
Java Question

Problems with MarshallingWebServiceInboundGateway

I'm using spring-boot with spring-integration and spring-ws to provide a SOAP web service as the entry point for my integration flow.

I've configured the inbound gateway thus:

MarshallingWebServiceInboundGateway entryPoint() {
MarshallingWebServiceInboundGateway entryPoint = new MarshallingWebServiceInboundGateway(jaxb2Marshaller());
return entryPoint;

Jaxb2Marshaller jaxb2Marshaller() {
Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller();
return jaxb2Marshaller;

The MessageDispatcherServlet has been configured thus:

public ServletRegistrationBean messageDispatcherServlet(ApplicationContext context) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
return new ServletRegistrationBean(servlet, "/entrypoint/*");

And the mapping:

MarshallingWebServiceInboundGateway entryPoint;

UriEndpointMapping uriEndpointMapping() {
UriEndpointMapping uriEndpointMapping = new UriEndpointMapping();
return uriEndpointMapping;

According to the docs, I should be able to use the
in this manner, but when I attempt a request on this endpoint in SoapUI, I get this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<faultstring xml:lang="en">No adapter for endpoint [entryPoint]: Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?</faultstring>

What am I missing here?


This problem was solved. I had to also define a bean as such:

MessageEndpointAdapter messageEndpointAdapter() {
    MessageEndpointAdapter adapter = new MessageEndpointAdapter();
    return adapter;

I could find no reference to this in any of the docs, but this solved this particular issues for me.