Kritika Singh

Kritika Singh

  • NA
  • 17
  • 4.4k

Calling soap webservices from android using ksoap.jar

Dec 30 2015 1:45 AM
I'm calling soap web services through SoapObject in ksoap.jar not through HttpPost as it has been deprecated. I can't use URLConnection as it is for REST API. I'm getting the error:
 
org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT Request format i...@2:1 in java.io.InputStreamReader@b5aca270)
 
This is the xml file that is been send:
 
<?xml version="1.0" encoding="utf-8"?><v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"><v:Header /><v:Body><GetUserDetailsPlus xmlns="http://tempuri.org/" id="o0" c:root="1"><LoginId i:type="d:string">USNAME</LoginId><Password i:type="d:string">Pswrd</Password></GetUserDetailsPlus></v:Body></v:Envelope>
 
Please can anyone help out??