Created
August 23, 2020 11:20
-
-
Save Yogendra0Sharma/64f9ce84f441fa4f6d5ab5faf4a9b5ba to your computer and use it in GitHub Desktop.
Node-SOAP Failed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please resolve the issue. I want to access GetSprint Method from WSDL.