Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hi All,
I am trying to call existing webservice developed in DOTNET which is soap, so off course it will be external deployed on the server.
Can anyone help me in this.
code in service i have written is as per below but it does not work. Can anyone help me if this possible and how.
var url = "https://companyurl.com/eProxy/service/MOSC_INI_SNA_SERVICE_Router";
var content =
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://www.informatica.com/dis/ws/" targetNamespace="http://www.informatica.com/dis/ws/">
<soapenv:Body>
<ws:Operation>
<ws:SNA_SERVICE_INPUT>
<ws:SGTIN>00300744339023</ws:SGTIN>
<ws:LOT_NUMBER>23456AA</ws:LOT_NUMBER>
<ws:EXPIRY_DATE>170630</ws:EXPIRY_DATE>
<ws:USER_ID></ws:USER_ID>
<ws:USER_DEVICE_ID>65787656576787</ws:USER_DEVICE_ID>
<ws:USER_GPS_LATITUDE>121</ws:USER_GPS_LATITUDE>
<ws:USER_GPS_LONGITUDE>654</ws:USER_GPS_LONGITUDE>
<ws:USER_GPS_ALTITUDE>56</ws:USER_GPS_ALTITUDE>
</ws:SNA_SERVICE_INPUT>
</ws:Operation>
</soapenv:Body>
</soapenv:Envelope>
var headers={ "Content-Type": "text/xml","SOAPAction":"https://companyurl.com/eProxy/service/MOSC_INI_SNA_SERVICE_Router"};
var params = {
timeout : 60,
headers : headers,
ignoreSSLErrors : true,
url : url,
content : content
};
var returnContent = Resources['ContentLoaderFunctions'].PostXML(params);
I am getting error : org.mozilla.javascript.UniqueTag@3264ecba: NOT_FOUND
Hi Rajesh,
What kind of result type does your service have?
Hi Rajesh,
I think the error it's not on the code itself of calling the SOAP service, it looks like you made a ThingWorx Javascript service which returns a value ( you set Input/Outputs -> Outputs something ) and you didn't set the var result = anyvalue; variable on your script.
Carles.