Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1239] Connecting to soap web service- Urgent!!!

GitHub Issuen/a
ResolutionNot Our Bug
Resolution Date2014-08-04T05:45:07.000+0000
Affected Version/sn/a
Fix Version/sn/a
ReporterDhaval Shah
AssigneeMauro Parra-Miranda


Hi, i have build the web service which is returning me the Json String. I am passing 3 params...which is simple. No XML and no Json string for now. Below is the code that i am requesting: function doClick(e){ Titanium.API.info("You clicked the button"); xhr.open('POST',''); xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); xhr.send({ searchType:'CON', searchString:'Ros', addStr:'' }); }; Above code giving me below error : (TiHttpClient-1) [700,40331] HTTP Error (org.apache.http.client.HttpResponseException): Unsupported Media Type i have changed the content type to (text/xml) : xhr.setRequestHeader("Content-Type","text/xml"); I got below error: from titanium ----------------- (TiHttpClient-1) [645,31890] HTTP Error (org.apache.http.client.HttpResponseException): Internal Server Error from webservice --------------------- Internal server is : Caused by: com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Please help me on this. I am stuck since two days on this.


  1. Mauro Parra-Miranda 2014-08-03

    Hello! The best way to test this is make sure that your webservice is working properly. Please get an extension of your favorite browser that allows you to run the webservice testing. Once you make sure the webservice is working, please print with Ti.API.info the response, and let's work from there. It's strange in your report you mention SOAP (which is XML by nature - http://stackoverflow.com/questions/9140299/why-not-soap-with-json) and later you mention JSON. Please you have to decide: either you are using SOAP (XML) or JSON. Best Regards!
  2. Dhaval Shah 2014-08-04

    Hi Mauro, thanks it is resolved now.I have Passed request xml in sent and convert response in json. You can close the call now.
  3. Mauro Parra-Miranda 2014-08-04

    Closed per last customer's comment.

JSON Source