Henrik Walland Lund Henrik Walland Lund - 1 year ago 160
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download