<TITLE>Web Services Test Client</TITLE>
var cnx = new HttpSoapConnection("http://<server-url>/nl/jsp/soaprouter.jsp");
var session = new SoapService(cnx, 'urn:xtk:session');
["sessiontoken", "string", "Login", "string", "Password", "string", "Parameters", "NLElement"],
["sessionToken", "string", "sessionInfo", "NLElement", "securityToken", "string"]);
var res = session.Logon("", "username", "password", <param/>);
var sessionToken = res;
var securityToken = res;
var query = new SoapService(cnx, 'urn:xtk:queryDef');
["sessiontoken", "string", "entity", "NLElement"],
<BODY onload="return test();">
I used exactly the same code mentioned in the reference and worked fine.
Here is the logInfo session and security token
If you are using the build in 'mc' account then you may need to whitelist the IP you are sending the request from.
Load these two js in your jsp page before invoking the call.
Note: ensure your user have proper rights to execute this.
I executed that code from a workflow.
Thanks for replying.
could you pls elaborate. which workflow ? and how that workflow can be accessed from outside (like from a web site)
Could you please tell me from where are you running this code?
But i tried the same code . I am getting this error.
Any idea how this can be resolved?
As is the case with the other method too, i.e HttpClientRequest.
Any help is appreciated. We are really stuck on this.
Note : IP whitelisting is done .
I replaced the values of username and password correctly.
The reason I am not getting any response might be the fact that I am working from behind a proxy(firewall). I am not able to connect to the endpoint URL. Any idea on how to get this working?
any help on this is much appreciated.
Thanks in advance
Thanks for the reply David.
I am working from behind a firewall (proxy) . That might be the reason that I am not getting the intended response.
While I tried the same thing through java,I applied following approach and it worked.
URL iurl = new URL("https://localhost/nl/jsp/soaprouter.jsp");
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("ip of proxy ", 8080/*port*/));
HttpURLConnection req = (HttpURLConnection)iurl.openConnection(proxy);
req.setRequestProperty("Content-Type", "text/plain; charset=utf-8");
Are you correctly replacing values such as "username" "password" with their actual values?
If I remember correctly we have a similar thread to this one: Adobe Campaign - SOAP API calls from a external webservice
Let me know,