Skip to content

Instantly share code, notes, and snippets.

@Yogendra0Sharma
Created August 23, 2020 11:20
Show Gist options
  • Save Yogendra0Sharma/64f9ce84f441fa4f6d5ab5faf4a9b5ba to your computer and use it in GitHub Desktop.
Save Yogendra0Sharma/64f9ce84f441fa4f6d5ab5faf4a9b5ba to your computer and use it in GitHub Desktop.
Node-SOAP Failed
import * as soap from "soap";
var platformPassword = 'PlatformAPIPassword';
var platformUsername = 'PlatformAPIUser';
var url = "https://docs.mendix.com/apidocs-mxsdk/apidocs/attachments/9535497/19398865.wsdl";
var requestArgs: any = null;
var options: any = {};
requestArgs = {
ApiKey: "667271d9-1b1b-4056-8c3e-4de044e9e57e",
ProjectID: "b1bdb9f4-d92f-4a0c-a469-b163d874df31"
};
let soapHeader: any = {
authentication:
{ username: platformUsername, password: platformPassword }
};
soap.createClient(url, options, function (err, soapClient) {
var method = soapClient['StoriesAPI']['StoriesAPIPort']['GetSprints'];
soapClient.addSoapHeader({
'authentication':
{ 'username': platformUsername, 'password': platformPassword }
}, "", "tns", "http://home.mendix.com/stories");
soapClient.GetSprints(requestArgs, function (err: any, result: any, envelope: any, soapHeader: any) {
console.log(JSON.stringify(result));
});
});
@Yogendra0Sharma
Copy link
Author

Please resolve the issue. I want to access GetSprint Method from WSDL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment