Hi,
I wish to call SOAP API from an external webservice/ javascript. Need help on the step by step process. If anybody has tried this before than please help.
I tried the below sample code but do not get any result for session and security token
~~ var cnx = new HttpSoapConnection("https://[instance url]/nl/jsp/soaprouter.jsp");
var session = new SoapService(cnx, 'urn:xtk:session');
session.addMethod("Logon", "xtk:session#Logon",
["sessiontoken", "string", "Login", "string", "Password", "string", "Parameters", "NLElement"],
["sessionToken", "string", "sessionInfo", "NLElement", "securityToken", "string"]);
var res = session.Logon("", "username", "password", <param/>);
var sessionToken = res[0];
var securityToken = res[2];
cnx.addTokens(sessionToken, securityToken);
var query = new SoapService(cnx, 'urn:xtk:queryDef');
query.addMethod("ExecuteQuery", "xtk:queryDef#ExecuteQuery",
["sessiontoken", "string", "entity", "NLElement"],
["res", "NLElement"]);
Solved! Go to Solution.
Hi,
Have you replaced "username" and "password" by their actual values in:
var res = session.Logon("", "username", "password", <param/>);
Can you check that you get some activity on the server when doing this?
Thanks,
Florent
Views
Replies
Total Likes
Hi,
Have you replaced "username" and "password" by their actual values in:
var res = session.Logon("", "username", "password", <param/>);
Can you check that you get some activity on the server when doing this?
Thanks,
Florent
Views
Replies
Total Likes
Hello,
Did you manage to resolve your issue?
Florent.
Views
Replies
Total Likes
Views
Likes
Replies