loopbackio / loopbackio/strong-soap
BUG: Attributes in the body tag are incorrectly handled
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 410
- Forks
- 162
- Avg merge
- 4h 36m
- Merged PRs (30d)
- 7
Description
Description/Steps to reproduce
When adding attributes to the body tag (e.g. <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">), the library currently returns the following error:
TypeError: Cannot read properties of undefined (reading 'output')
at Server._executeMethod (/usr/src/app/node_modules/strong-soap/src/server.js:337:44)
at Server._process (/usr/src/app/node_modules/strong-soap/src/server.js:207:14)
at IncomingMessage. (/usr/src/app/node_modules/strong-soap/src/server.js:112:18)
at IncomingMessage.emit (node:events:513:28)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Currently, this was only supported using the document style and when the attributes key was set to the default "attributes". If the rpc style is used or a different attributesKey is set up, this is not supported.
Expected result
Adding attributes to the body tag of the request should not result in an error and rather return the same as a call without any attributes in the body tag.
Additional information
linux x64 20.12.2
npm WARN config production Use --omit=dev instead.
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 in src/server.js at the _executeMethod and _process paths shown in the error trace, then reproduce a SOAP request with attributes on the body tag. Compare document and rpc styles and the default versus custom attributesKey behavior. Done means the request no longer errors and returns the same result as the equivalent request without body attributes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100