Skip to content

Instantly share code, notes, and snippets.

@omidnasri
Created June 19, 2019 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omidnasri/7dbc80c1e11c8f5ac2c7805664b9bb60 to your computer and use it in GitHub Desktop.
Save omidnasri/7dbc80c1e11c8f5ac2c7805664b9bb60 to your computer and use it in GitHub Desktop.
Node JS
node.js
npm i strong-soap
// رضا پولادینه
var soap = require('strong-soap').soap;
var url = 'http://yoururl/Services/API/IPerson.svc?wsdl';
var requestArgs = {"username": 'نام کاربری',"password": 'رمز',
person:{
FirstName:"node",
LastName:"node",
CrmObjectTypeCode:"کد ساخته شده در crm",
CrmObjectTypeIndex:"24",
'Categories' : {'CategoryInfo' : {'Key':"کلید ساخته شده در crm" } }
}
};
var options = {};
soap.createClient(url, options, function(err, client)
{
var method = client['SavePerson'];
method(requestArgs, function(err, result, envelope, soapHeader)
{
res.json(result);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment