node-soap icon indicating copy to clipboard operation
node-soap copied to clipboard

fix: Add space after `xmlns:wsu` to prevent xmldom warning

Open scagood opened this issue 2 years ago • 3 comments

This removes the following xmldom warning:

[xmldom warning]        attribute space is required"xmlns:wsu"!!
  at DOMHandler.warning (<root>/node_modules/@xmldom/xmldom/lib/dom-parser.js:251:29)
  at parseElementStartPart (<root>/node_modules/@xmldom/xmldom/lib/sax.js:398:19)
  at parse (<root>/node_modules/@xmldom/xmldom/lib/sax.js:167:15)
  at XMLReader.parse (<root>/node_modules/@xmldom/xmldom/lib/sax.js:47:3)
  at DOMParser.parseFromString (<root>/node_modules/@xmldom/xmldom/lib/dom-parser.js:96:7)
  at SignedXml.computeSignature (<root>/node_modules/xml-crypto/lib/signed-xml.js:721:23)
  at WSSecurityCert.postProcess (<root>/node_modules/soap/lib/security/WSSecurityCert.js:141:21)
  at Client._invoke (<root>/node_modules/soap/lib/client.js:357:33)
  at <root>/node_modules/soap/lib/client.js:187:18

This was because there was no space between the following attributes in the Security header:

<wsse:Security xmlns:wsu="docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"soap:mustUnderstand="1">

This is now:

<wsse:Security xmlns:wsu="docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soap:mustUnderstand="1">

scagood avatar Mar 21 '23 11:03 scagood

🤔 I am not sure why the tests are failing, they look unrelated to the change I made.

The tests also look to be passing on my local machine 👀

scagood avatar Mar 22 '23 15:03 scagood

The required fix can be found in #1206 I will rebase once that is merged.

scagood avatar May 07 '23 08:05 scagood

Hello, I am receiving the same error, this merge will resolve the issue.

efreibe avatar Sep 29 '23 18:09 efreibe

I don't see any problem with this change, tried locally and all tests passed.

w666 avatar May 01 '24 08:05 w666