I have been experimenting with receiving SOAP responses in a mobile application I am developing using Titanium Studio (version 2.1.1). I have integrated the suds library for this purpose, but when I make the call, I encounter an error
[WARN] Exception in event callback. {<br>
line = 27;<br>
message = "Can't find variable: window"
I am puzzled about why this error is occurring, as I have included the suds.js library and the app does not crash, it just fails to send. Here is the code snippet I am using:
var suds = new SudsClient({
endpoint: 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL',
targetNamespace: 'http://ws.cdyne.com/'
});
var soapBtn = Ti.UI.createButton({
title:'SOAP',
bottom:'100'
});
homeHolder.add(soapBtn);
var callParams = {
ZIP:'33325'
};
soapBtn.addEventListener('click',function(e){
suds.invoke("GetCityForecastByZIP", callParams, function(xmlDoc) {
var response = xmlDoc.documentElement.getElementsByTagName('GetCityForecastByZIPResult');
Ti.API.info(response);
});
Could you help me figure out what mistake I am making? Thanks!