Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Calling Adobe Campaign Classic SOAP API in Javascript

Avatar

Avatar
Validate 10
Level 3
davidh2892249
Level 3

Likes

16 likes

Total Posts

131 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
davidh2892249
Level 3

Likes

16 likes

Total Posts

131 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
davidh2892249
Level 3

01-04-2020

Hi there,

 

I've followed some examples I've found on other posts to successfully make a variety of SOAP calls in Javascript.

 

However, one that isn't working are the Write and WriteCollection methods.

 

I'm very familiar with the Write method and I've managed to add other methods and use them successfully (Logoff, GetCnxInfo, SubmitDelivery, ExecuteQuery, PostEvent) and have used a similar approach below for those?

 

See code below, could anyone advise what I'm doing wrong?

 

@MarcelSzimonisz  - Any ideas?
(FYI I'm actually executing this code in a Javascript activity in a workflow of one Adobe Campaign instance, connecting to another. No clues in the workflow audit)

 

------

var cnx = new HttpSoapConnection("https://DOMAINGOESHERE.com/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("", "USERNAMEGOESHERE", "PASSWORDGOESHERE", <param/>);

var sessionToken = res[0];
var securityToken = res[2];


cnx.addTokens(sessionToken, securityToken);


session.addMethod("Write", "xtk:session#Write",
["sessiontoken", "string", "domDoc", "NLElement"],
[]);
//no response for this method

 

var writeRecord = session.Write("", <recipient _operation="insert" email="davidh@somedomain.com" firstName="David" xtkschema="nms:recipient"/>);



Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

976 likes

Total Posts

1,096 posts

Correct Reply

514 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

976 likes

Total Posts

1,096 posts

Correct Reply

514 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

01-04-2020

Hi,

 

Use xtk:persist#Write.

 

Thanks,

-Jon

Answers (0)