Socket
Socket
Sign inDemoInstall

node-salesforce-connection

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 2.2.0

xml.js

2

package.json
{
"name": "node-salesforce-connection",
"version": "2.1.0",
"version": "2.2.0",
"description": "A minimal library for connecting to Salesforce from Node.js",

@@ -5,0 +5,0 @@ "license": "MIT",

"use strict";
let https = require("https");
let urlEncoder = require("./urlencoder");
let xmlParser = require("./xmlparser");
let xmlBuilder = require("./xmlbuilder");
let xml = require("./xml");

@@ -170,12 +169,12 @@ // See README.md for documentation.

}
let requestBody = xmlBuilder(
"soapenv:Envelope",
' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="' + wsdl.targetNamespace + '"',
{
let requestBody = xml.stringify({
name: "soapenv:Envelope",
attributes: ' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="' + wsdl.targetNamespace + '"',
value: {
"soapenv:Header": Object.assign({}, sessionHeader, headers),
"soapenv:Body": {[method]: args}
}
);
});
return this._request(httpsOptions, requestBody).then(response => {
let resBody = xmlParser(response.body.toString())["soapenv:Envelope"]["soapenv:Body"];
let resBody = xml.parse(response.body.toString()).value["soapenv:Body"];
if (response.statusCode == 200) {

@@ -223,10 +222,6 @@ return resBody[method + "Response"].result;

asArray(x) {
if (!x) return [];
if (x instanceof Array) return x;
return [x];
}
}
SalesforceConnection.prototype.asArray = xml.asArray;
module.exports = SalesforceConnection;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc