loopbackio / strong-soap

SOAP driver for Node.js (A complete rewrite of node-soap)
Other
391 stars 162 forks source link

BUG: Attributes in the body tag are incorrectly handled #815

Open natanbcpc opened 3 months ago

natanbcpc commented 3 months ago

Description/Steps to reproduce

When adding attributes to the body tag (e.g. ), 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.