Skip to content

Conversation

artembilan
Copy link
Member

Fixes #3688

The WebServiceTemplate is populated with some defaults from its ctor.
We should rely on the target default template values as much as possible
and don't override them to null if end-user doesn't ask about that explicitly

  • Fix BaseWsOutboundGatewaySpec extensions to populate values to the target gateway
    only if they are not null - therefore provided by end-user
  • If end-user wants them explicitly null, it is better to do that via
    externally configured template.
    See overloaded variants for DSL: Ws.marshallingOutboundGateway(WebServiceTemplate)
    and Ws.simpleOutboundGateway(WebServiceTemplate)

Cherry-pick to 5.4.x & 5.3.x

Fixes spring-projects#3688

The `WebServiceTemplate` is populated with some defaults from its ctor.
We should rely on the target default template values as much as possible
and don't override them to `null` if end-user doesn't ask about that explicitly

* Fix `BaseWsOutboundGatewaySpec` extensions to populate values to the target gateway
only if they are not null - therefore provided by end-user
* If end-user wants them explicitly `null`, it is better to do that via
externally configured template.
See overloaded variants for DSL: `Ws.marshallingOutboundGateway(WebServiceTemplate)`
and `Ws.simpleOutboundGateway(WebServiceTemplate)`

**Cherry-pick to `5.4.x` & `5.3.x`**
@garyrussell garyrussell merged commit db14fad into spring-projects:main Dec 13, 2021
@garyrussell
Copy link
Contributor

... and cherry-picked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MarshallingWsOutboundGatewayNoTemplateSpec overwrites useful WebserviceTemplate defaults with null

2 participants