Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

SOAP call getting failed


SOAP call getting failed


I have created a service to invoke webservice and simply testing it to see results,if completed but getting HttpHostConnectException error.

as shown below:

Service :


Test Service:


Any comments on this??

5-Regular Member

Hi Tarun Nayyar

By looking at the error it seems that the url is not reachable. Could you please reconfirm if the url is accessible from the ThingWorx server or not?

Also, what are the errors in ThingWorx Application, Script, Communication logs


Ankit Gupta


Error in logs is same as in above Test Service window. And this URL is working fine if invoked by direct hit from TWX but not through TWX javascript

Hi Tarun ,

If that is the case with the same logs you counter , could you check what is result you are getting from postxml

Try result.toString() and see what response you get surely in the response there will be problem you have faced .

Also in the postxml you can pass username or pass if it is the authentication problem .

Also i cannot see the Namespace you have set in your code !


sorry,I mis-interpreted the requirement.

I need to invoke a webservice url with single input and get the reposne in infotable.

What to do for that?

I'am assuming you have got the response , then it will be just the xml looping and bind the result to the infotable you created .

This will be on the fly result ... if the service ends too slow in getting result you can store the XML over the repository and then you can loop over

the repository XML for result in infotable

var searchParam = "";  // you can pass here input from mashup

var soapenv = new Namespace('');

    var asi = new Namespace('');

    var content= <soapenv:Envelope xmlns:soapenv="" xmlns:asi="">



  <GetGeoIP xmlns="">

  <IPAddress>{searchParam }</IPAddress>




                // SOAPEndpoint and SoapAction

    var headers = new Object();

    headers.SOAPAction = "";

    var params1 = {

        timeout : 60,

        headers : headers,

        ignoreSSLErrors : true,

        url : '',

        content : content


    var soapEnv = new Namespace("SOAP-ENV","");

    var xmlResponse= Resources['ContentLoaderFunctions'].PostXML(params1);

  var params = {

    infoTableName : "InfoTable",

   dataShapeName : "testds"


var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);

var soapEnv = new Namespace("SOAP-ENV","");

    var rpc = new Namespace("");

    var xmlRealm= xmlResponse.soapEnv::Body.rpc::GetGeoIPResponse;

    default xml namespace = "";

  for each(var getInto in xmlRealm.GetGeoIPResult) {

            var newEntry = new Object();

            newEntry.CountryName = getInto.CountryName; // STRING




Let me know for any issues , bind the service after entering parameter from mashup on submit button or onchange of textbox


It's still throwing error:

It's working fine at my end .. i ran at 5.4 as well as ThingWorx 6.5  for any glitch, what is your TW version , could please run the service and attach all logs here .

May be your TW server is not connecting to the specified Web-service Url or you are on proxy and trying to connect the Web-service Url .