Hello! We've seen this raised a few times here, but never with a resolution. So I'm going to try again!
As we're a "hosted service", we have no front-end access to our Message Center instances. We have two instances, RT1 and RT2, load-balanced under RT-LB. I'm trying to update the quarantine status of a given email address on both RT1 and RT2, and I'm using this code:
// RT instance connection details
var remoteInstanceUrl = 'https://<rt_instance_host>.campaign.adobe.com';
var authHeaderName = "Authorization";
var authToken = "<auth_token_from_IMS>";
var authHeaderValue = "Bearer " + authToken;
// Create HttpSoapConnection and inject auth bearer token into the header
var rtConnection = new HttpSoapConnection(remoteInstanceUrl + '/nl/jsp/soaprouter.jsp', 'utf-8', 0);
rtConnection.setHeader(authHeaderName, authHeaderValue);
// Create session write proxy service, based on xtk:session.Write WSDL definition
var sessionSoapSrv = new SoapService(rtConnection, 'xtk:session');
sessionSoapSrv.addMethod(
"Write",
"xtk:session#Write",
["sessiontoken", "string", "domDoc", "NLElement"],
[] // no return elements
);
// Email and status to update
var emailAddress = 'testemail@testemail.com';
var newStatus = '2'; // This is the 'Valid' status
// Construct XML to update the Quarantine status
var sessionUpdateXml = new XML(<address
xtkschema="nms:address"
_operation="insertOrUpdate"
status={newStatus}
address={emailAddress}
_key="@address"/>);
try {
// Call the proxy Soap Service on the RT instance
sessionSoapSrv.Write("", sessionUpdateXml);
logInfo("nms:address update succeeded.");
}
catch (e) {
logError("nms:address update failed: " + e);
}
On running this code, obviously with a valid remoteInstanceUrl (either the RT1 or RT2 URL) and valid IMS auth token, I get this error:
SOP-330024 Unspecified function library ('library' attribute) for JavaScript SOAP call 'Write' in schema 'xtk:session'.
This suggests to me that there is an issue with the structure of the proxy SoapService for the "Write" method. But the code above reflects exactly how the SOAP method is defined in the WSDL.
The connection itself, and the session API, works fine as we've tested it successfully using a proxy SoapService on the "GetServerTime" method, as well as successfully testing similar mappings to the "xtk:queryDef" API.
The issue ONLY occurs with the "Write" method.
Links to related articles:
Relevant documentation:
Has anyone managed to write changes to the RT instance schemas from the Marketing instance?