spring-projects / spring-projects/spring-integration
Support for null payloads. [INT-997]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 1.2k
- Avg merge
- 17h 48m
- Merged PRs (30d)
- 62
Description
Oyvind Kvien opened INT-997 and commented
Spring Integration should support null payloads.
A common case is when using legacy services in a service-activator. The service might return null, and I don't want to refactor it as it's been running stable for years. If Spring Integration don't support null payloads I'll be forced the create a wrapper around it to control it's return type, which is poor design.
Another common case is when using an XmlPayloadUnmarshallingTransformer, like this:
<si-xml:unmarshalling-transformer input-channel="freeTextSearchResponseChannel" unmarshaller="freeTextSearchUnmarshaller"/>
It receives XML from channel "freeTextSearchResponseChannel" and unmarshals it. If the XML is invalid the transformer will return null based on which unmarsller you pick. This will cause the message payload to be null.
Affects: 1.0.3
Reference URL: http://forum.springsource.org/showthread.php?t=85345
Issue Links:
- #6203 Add support for null return values in gateway/service-activator methods
8 votes, 7 watchers
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the service-activator and XmlPayloadUnmarshallingTransformer entry points described in the issue, along with the related gateway/service-activator issue #6203. Define how null returns and invalid XML results should be represented, then verify that legacy service returns and transformer results can be handled without requiring a wrapper.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100