2

Hi guys I am working with a WebService in Android. I tried to send the data to the WebService. As a response I am getting this warning.

06-06 18:50:50.830: W/Response String is=(6930): n--uuid:8787683b-c7db-4abc-abbe-2042ff4877be+id=1nContent-ID: <http://tempuri.org/0>nContent-Transfer-Encoding: 8bitnContent-Type: application/xop+xml;charset=utf-8;type="text/xml"nn<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><CreateNewCaseResponse xmlns="http://www.ci.tenmind.va.us/CORServices/tenmindAuditorHotlineService/2011/08/AuditorHotlineService"><CreateNewCaseResult xmlns:a="http://www.ci.tenmind.va.us/CORServices/2011/08/AuditorHotlineService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><a:CaseId>be140e83-bd1a-4134-a5e9-097a1d8dd654</a:CaseId><a:CaseNumber>2012060005</a:CaseNumber><a:ErrorMsg/><a:PassCode>Pw2f3MEg9</a:PassCode></CreateNewCaseResult></CreateNewCaseResponse></s:Body></s:Envelope>n--uuid:8787683b-c7db-4abc-abbe-2042ff4877be+id=1—n

When I try to parse the above string I get this Exception:

06-06 15:43:17.441: W/System.err(13064): org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT 
06-06 15:43:17.445: W/System.err(13064): --uuid:ac00e661...@3:13 in java.io.InputStreamReader@4132afb0) 
06-06 15:43:17.465: W/System.err(13064):    at org.xmlpull.v1.sax2.Driver.parse(Driver.java:331)
06-06 15:43:17.476: W/System.err(13064):    at com.vensi.api.parser.XMLParser.fromXML(XMLParser.java:75)
06-06 15:43:17.484: W/System.err(13064):    at com.vensi.api.parser.XMLParser.fromXML(XMLParser.java:54)
06-06 15:43:17.484: W/System.err(13064):    
at org.tenmind.HttpPostConnection$Communicator.run(HttpPostConnection.java:468)

Any idea how to resolve this issue?

Sam
  • 86,580
  • 20
  • 181
  • 179
user1195614
  • 385
  • 2
  • 8
  • 20
  • check your file encoding – pleerock Oct 11 '12 at 07:01
  • Please see the answer for the [similar question](http://stackoverflow.com/questions/15254089/kxmlparser-throws-unexpected-token-exception-at-the-start-of-rss-pasing). In gist- there are some invisible byte marks that choke the pull parser – Bostone Mar 12 '13 at 18:29
  • I don't know the cause for that, but I had the same error before and it disappeared after restarting the emulator without changing the input or the handling. Maybe it's worth a try. – Alécio Carvalho Jul 07 '12 at 08:13

1 Answers1

-3

File format for Android is "UTF-8 without BOM"