Hi,
I am trying to send data to an external webservice and am getting a 400: Bad request error.
Have been digging on the problem since a long time.
Many of the experts I know tell me that the code seems fine.
I have now started looking at things apart from the main xsjs code that might be causing an issue.
The webservice I am trying to reach is let's say in the form abc.xyz.com:334/webservice/services/addr
host = "abc.xyz.com";
port = 334;
pathPrefix = "webservice/services/addr";
description = "WebService";
useSSL = true;
proxyType = none;
sslAuth = client;
useProxy = false;
proxyHost = "";
timeout = 0;
authType = none;
The XSJS code has the request definition as below:
var request = new $.net.http.Request($.net.http.GET, "");
When I change the host value in destination file, to a junk value.For ex. I change abc.xyz.com to abc.xom and try to call this webservice ,I get the below error:
HttpClient.request: request failed: unable to establish connection to abc.xom:334 - IPcon: connection to host failed!
Notice that there is no pathPrefix(webservice/services/addr) in the error . This makes me think that the pathPrefix is somehow not adding on to the link.
Or it might just be the way the error is displayed.
Please let me know if you have any experience on the same.
Thanks,
Shyam