wcf - Android exception org.xmlpull.v1.XmlPullParserException: expected: START_TAG -


i have been trying consume .net webservic

private static final string soap_action = "http://tempuri.org/icustomers/getallproductsdt"; private static final string method_name = "getallproductsdt"; private static final string namespace = "http://tempuri.org/"; private static final string url = "http://10.121.11.53/customers/customers.svc";     soapobject request = new soapobject(namespace, method_name);  soapserializationenvelope soapenvelope = new soapserializationenvelope(soapenvelope.ver11); soapenvelope.setoutputsoapobject(request); httptransportse androidhttptransportse = new httptransportse(url); androidhttptransportse.debug=true; androidhttptransportse.call(soap_action, soapenvelope); string str= soapenvelope.getresponse().tostring(); 

my first log doesn't show in logcat , second 1 catched following excpetion :

org.xmlpull.v1.xmlpullparserexception: expected: start_tag {http://schemas.xmlsoap.org/soap/envelope/}envelope (position:start_tag <html>@1:6 in java.io.inputstreamreader@43e56bb0)   05-14 16:08:28.573: w/system.err(3532): org.xmlpull.v1.xmlpullparserexception: expected: start_tag {http://schemas.xmlsoap.org/soap/envelope/}envelope (position:start_tag <html>@1:6 in java.io.inputstreamreader@43e56bb0)  

its not problem android or webservice.

there might app_html.offline in appcode doesnt allow run online.

go solution explorer in c#.

rightclick , exclude project. :d

and

you should have below format consume .net web service in android using ksoap.

   private static final string url = "http://....asmx"; // make sure url end .asmx    private static final string namespace = "http://domain.com"; // may contain "/" @ of name space. because it's name space.    private static final string method_name = "userlogin"; // method name    private static final string soap_action = "http://domain.com/userlogin"; // domain , method name. 

just need follow above structure.


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -