Rafal Kural
Rafal Kural

Reputation: 57

Sending empty response with MarshallingWebServiceInboundGateway

Is there a way to send back an empty response back to the caller, when using MarshallingWebServiceInboundGateway? I know with MarshallingWebServiceOutboundGateway, there is an explicit method to allow empty responses, but I don't see one for inbound. Googling doesn't get me any results, either

Upvotes: 0

Views: 48

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121542

The ignoreEmptyResponses is only relevant to the SimpleWebServiceOutboundGateway. See its JavaDocs:

/**
 * Specify whether empty String response payloads should be ignored.
 * The default is <code>true</code>. Set this to <code>false</code> if
 * you want to send empty String responses in reply Messages.
 * @param ignoreEmptyResponses true if empty responses should be ignored.
 */
public void setIgnoreEmptyResponses(boolean ignoreEmptyResponses)

As far as I know there is no way to send something like null with a marshaller.

You probably should just send some special POJO back into a reply and WS client should done something with that one.

Upvotes: 1

Related Questions