Workflow soap call via JS doesn't work through campaign but same works from SOAP UI



Sample JS file added below which is causing the error. Could someone help to fix this issue?

This SOAP request get success while trying from a SOAP UI

var req = new HttpClientRequest("https://xxxxx/test/ws");
logInfo("Connection establish..");
req.header["Content-Type"] = "text/xml; charset=utf-8";
req.header["SOAPAction"] = "";
req.header["Host"] = "xxxxx";
req.method = "POST";
logInfo("All parameters set");
req.body = '<soapenv:Envelope xmlns:sms="/sms" xmlns:soapenv="">'+
' <soapenv:Header><wsse:Security xmlns:wsse="" xmlns:wsu=""><wsse:UsernameTo... wsu:Id="UsernameToken-xxxx"><wsse:Username>UserWs</wsse:Username><wsse:Password Type="">x... EncodingType="">xxxx...
logInfo("Req executed")
var resp = req.response;
var xmlRes = new XML(String(resp.body).replace("<?xml version='1.0'?>",""));



Audit log


03/17/2020 8:43:35 AM Workflow finished
03/17/2020 8:43:35 AM js tion is org.apache.wss4j.common.ext.WSSecurityException: The message has expired</faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
03/17/2020 8:43:35 AM js <SOAP-ENV:Envelope xmlns:SOAP-ENV=""> <SOAP-ENV:Header/> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Client</faultcode> <faultstring xml:lang="en">The message has expired; nested excep
03/17/2020 8:43:35 AM js Req executed
03/17/2020 8:43:35 AM js INT-150012 The HTTP query returned a '' type error (500)


I already added the entry under in serverconf.xml



<url dnsSuffix="xxxx" urlRegEx="https://.*" />


Does the timezone difference in our server and the req.header["Host"] = "xxxxx"; server makes this kind of problem ?

Accepted Solutions (1)

Accepted Solutions (1)



The 500 error is coming from your destination system. It looks like your request is working but the system you are requesting data from is throwing a 500 error. The hints will be in the nested exception details.

Issues like this during auth can occur when system clocks are out by too much, etc

I would contact the admin for the SMS system you are trying to send messages through and debug from there

Answers (0)