Adobe Campaign - SOAP API calls from a external webservice

Avatar

Avatar
Validate 1
Level 2
priyankav251023
Level 2

Likes

9 likes

Total Posts

19 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
priyankav251023
Level 2

Likes

9 likes

Total Posts

19 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
priyankav251023
Level 2

24-11-2016

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"]);

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

30-11-2016

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

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

13-12-2016

Hello,

Did you manage to resolve your issue?

Florent.