Below code is working fine in Iphone and Android.But while executing in Blackberry i am getting error on below line of code: var xml = Ti.XML.parseString( this.responseText); Please let me know what can i do to solve this problem.
1.Application type: mobile
2.Titanium SDK: version 3.1.1, Titanium SDK version 3.1.1.GA
3.Platform & version: Black berry 10 Dev Alpha simulator:10_1_0_132
4.Device :Blackberry
5.Host Operating System: Windows 8
6.Titanium Studio: Titanium Studio, build: 3.1.1.201306112235 7.
var request = Titanium.Network.createHTTPClient(); request.open('POST', url); request.setRequestHeader('enctype', 'multipart/form-data'); request.setRequestHeader('Content-Type', 'text/xml; charset=utf-8'); request.setRequestHeader('SOAPAction', soapAction);
var message = '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://tempuri.org/">'; message = message + '<soap:Header/>'; message = message + '<soap:Body><' + name + ">"; for (var i = 0; i < paramKeys.length; i++) { var key = paramKeys[i]; var val = paramValues[i]; message = message + '<' + key + '>' + val + '</' + key + '>'; } message = message + '</' + name + '></soap:Body></soap:Envelope>';
request.onload = function() { try {
Titanium.API.log('Success New :' + url);
Titanium.API.log('ResponseText New: ' + this.responseText);
var xml = Ti.XML.parseString( this.responseText);
var catalogList = xml.documentElement.getElementsByTagName(keyName);
}
Web Service response: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><SearchBusStationResponse xmlns="http://tempuri.org/"><SearchBusStationResult>[{"Title":"Jebel Ali Free Zone, Marine Control Tower","StationID":"772001","Area":null,"ZoneNo":"7720","Distance":3120.88,"Description":null,"ID":140498,"Published":true,"CreatedDate":"\/Date(1349685441000)\/","CreatedBy":"Excel","UniqueName":"634852966418777812","StartDate":null,"EndDate":null,"ModuleType":"BusStationDAL.Model.BusStation","Keywords":null,"ShowInHomePage":false,"GeoCoordinateX":55.049193,"GeoCoordinateY":24.991467,"MetaPageTitle":null,"MetaPageDescription":null,"MainImage":null,"Comments":[],"Ratings":[]} ....... </SearchBusStationResult></SearchBusStationResponse></s:Body></s:Envelope>