Hi All,
Am getting below error :
Unspecified function library ('library' attribute) for JavaScript SOAP call 'Write' in schema 'xtk:session'.
Could anyone help for missing anything in below code:
loadLibrary('xtk:common.js')
loadLibrary('xtk:wsdlToolbox.js')
try {
logInfo("PREPARING SESSION");
var cnx = new HttpSoapConnection("http://some.com/nl/jsp/soaprouter.jsp");
try {
var session = new SoapService(cnx, 'urn:xtk:session');
try {
session.addMethod("Logon", "xtk:session#Logon",
["sessiontoken", "string", "Login", "string", "Password", "string", "Parameters", "NLElement"],
["sessionToken", "string", "sessionInfo", "NLElement", "securityToken", "string"]);
logInfo("STARTING LOGON SESSION");
var res = session.Logon("", "Test", "Test", <param/>);
logInfo("RESPONSE: " + JSON.stringify(res));
var sessionToken = res[0];
var securityToken = res[2];
cnx.addTokens(sessionToken, securityToken);
logInfo("PREPARING WRITE");
var event = new SoapService(cnx, 'urn:xtk:session');
logInfo("WRITE SESSION : " + event);
event.addMethod("Write", "xtk:session#Write",
["sessiontoken", "string", "domDoc", "NLElement"],
["res", "NLElement"]);
logInfo("STARTING OPT SESSION");
var eventRes = event.Write("",
<rt_opt
xtkschema="pl_:rt_opt"
BUSINESS_UNIT_CD ="TEST"
EXT_CONTACT_ID ="Test"
EXT_CONSUMER_ID ="Test"
EXT_SOURCE_CD ="Test"
recipientId=""
email ="abc@test.com"
OPT_SOURCE_CD =""
OPT_ID ="1603"
OPT_CHANNEL_CD ="EM"
OPT_RULE_CD =""
OPT_STATUS ="IN"
TRANSACTION_ID =""
STATUS_CD ="N"
RESUBMIT_IND ="N"
EXT_RECORD_TS =""
OPT_TS ="">
</rt_opt>);
logInfo("PARSING RESULTS");
if (null === eventRes || undefined === eventRes) {
logError("No response");
}
logInfo("EVENT RESPONSE: " + eventRes.toString())
logInfo("XML OUTPUT IS : " + eventRes.toXMLString())
} finally {
event.dispose();
logInfo("EVENT DISPOSED")
} */
} finally {
session.dispose();
logInfo("SEESSION DISPOSED")
}
} finally {
cnx.dispose();
logInfo("CNX DISPOSED")
}
} catch (e) {
logError(e);
}
Regards,
Rajshekar.