Comments on: How to Consume Web Services from Android Applications Using kSOAP2 http://www.itcsolutions.eu/2011/03/03/how-to-consume-web-services-from-android-applications-using-ksoap2/ Solutions and tutorials for IT&C development Fri, 27 Mar 2020 20:45:50 +0000 hourly 1 https://wordpress.org/?v=5.5.1 By: Sayo http://www.itcsolutions.eu/2011/03/03/how-to-consume-web-services-from-android-applications-using-ksoap2/comment-page-1/#comment-2418 Fri, 30 Aug 2013 06:57:03 +0000 http://www.itcsolutions.eu/?p=2211#comment-2418 hey,
I am using soap object only…
and eveything is working f9 if i use API 8…
but if i swich API to 9 to higher this doesnt work…
Plz need help regarding this..
Thanks

]]>
By: Chitra http://www.itcsolutions.eu/2011/03/03/how-to-consume-web-services-from-android-applications-using-ksoap2/comment-page-1/#comment-2220 Wed, 28 Nov 2012 05:32:35 +0000 http://www.itcsolutions.eu/?p=2211#comment-2220 thanks Paul for answering Nobin’s question it helped me.

]]>
By: hckr http://www.itcsolutions.eu/2011/03/03/how-to-consume-web-services-from-android-applications-using-ksoap2/comment-page-1/#comment-1969 Tue, 31 Jul 2012 12:56:21 +0000 http://www.itcsolutions.eu/?p=2211#comment-1969 do i need WTP plugin?

]]>
By: ALI HABIB http://www.itcsolutions.eu/2011/03/03/how-to-consume-web-services-from-android-applications-using-ksoap2/comment-page-1/#comment-1886 Wed, 02 May 2012 14:43:55 +0000 http://www.itcsolutions.eu/?p=2211#comment-1886 how to call function in webservice that call function take parameters

]]>
By: rathu http://www.itcsolutions.eu/2011/03/03/how-to-consume-web-services-from-android-applications-using-ksoap2/comment-page-1/#comment-1882 Thu, 26 Apr 2012 06:31:41 +0000 http://www.itcsolutions.eu/?p=2211#comment-1882 I hav tryd with kvmserializable still the error persists.

]]>
By: rathu http://www.itcsolutions.eu/2011/03/03/how-to-consume-web-services-from-android-applications-using-ksoap2/comment-page-1/#comment-1881 Thu, 26 Apr 2012 06:30:16 +0000 http://www.itcsolutions.eu/?p=2211#comment-1881 Hi Paul,
I can able to retrieve data from Webservice. But i am not able to write complex data types like date,float etc into the webservice. I am not able to parse the date and float values. So plz help me out.

]]>
By: sumadhi http://www.itcsolutions.eu/2011/03/03/how-to-consume-web-services-from-android-applications-using-ksoap2/comment-page-1/#comment-1859 Wed, 28 Mar 2012 07:36:31 +0000 http://www.itcsolutions.eu/?p=2211#comment-1859 iam developing andriod application to consume webservices which is written in .net

my code:
private static final String SOAP_ACTION = “http://tempuri.org/WebServiceDemo/HelloTo”;

boolean result=false;
private static final String METHOD_NAME = “HelloTo”;

private static final String NAMESPACE = “http://tempuri.org/WebServiceDemo/”;

private static final String URL = “http://10.0.2.2/test11/demos/dotnet/webservicedemo.asmx”;

public boolean call()
{
Toast.makeText(getBaseContext(),”method called”, Toast.LENGTH_SHORT).show();

Toast.makeText(getBaseContext(),”in try”, Toast.LENGTH_SHORT).show();
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
//request.getAttribute(“sumati”);
//request.addAttribute(“str”, phone);
request.addProperty(METHOD_NAME,phone);
//request.addProperty(“strText”,”sumati”);
//EditText mob=EditText(findViewById(id))
//Log.e(“success”,”success”);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
Toast.makeText(getBaseContext(),”request1″, Toast.LENGTH_SHORT).show();

HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
Toast.makeText(getBaseContext(),”request2″, Toast.LENGTH_SHORT).show();
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
Toast.makeText(getBaseContext(),”request3″, Toast.LENGTH_SHORT).show();
Log.i(“myApp”, response.toString());
System.out.println(“response” +response);

if(response.toString().equalsIgnoreCase(“success”))
{
result = true;

}

}catch(SocketException ex)
{
//Log.e(“Error : ” , “Error on soapPrimitiveData() ” + ex.getMessage());
//ex.printStackTrace();
}
catch (Exception e) {
Log.e(“Error : ” , “Error on soapPrimitiveData() ” + e.getMessage());
e.printStackTrace();
}
return result;

my logcat says:

03-28 12:05:39.732: E/Error :(1161): Error on soapPrimitiveData() attr value delimiter missing! (position:START_TAG @2:11 in java.io.InputStreamReader@44eb1f68)
followed by xmlpullparser exception
i want to run on local host.

please suggest

]]>
By: Paul http://www.itcsolutions.eu/2011/03/03/how-to-consume-web-services-from-android-applications-using-ksoap2/comment-page-1/#comment-1850 Sat, 24 Mar 2012 21:40:20 +0000 http://www.itcsolutions.eu/?p=2211#comment-1850 In reply to Rajnikant.

Hi Rajnikant,

As far as I know that is the only way to retrieve complex objects through a SoapObject. You can wrap the call in your own method that creates a Person object by using several GetProperty() calls.

Paul

]]>
By: Rajnikant http://www.itcsolutions.eu/2011/03/03/how-to-consume-web-services-from-android-applications-using-ksoap2/comment-page-1/#comment-1844 Tue, 20 Mar 2012 12:43:08 +0000 http://www.itcsolutions.eu/?p=2211#comment-1844 Hi,
Thanks for the post.
I have question
I have developed my wcfservice in microsoft.net.
Now I want to consume it in android.
I can do it with ksoap library easily, working fine with simple data.

Now I have Wcf Service method which returns a Person object which is created in .net.

Now I want to get that Person into android.
How can I do that ?

Note : I can achieve it by using GetProperty method, but I want direct assignment.

Thanks,
Rajnikant

]]>
By: Paul http://www.itcsolutions.eu/2011/03/03/how-to-consume-web-services-from-android-applications-using-ksoap2/comment-page-1/#comment-1360 Thu, 01 Sep 2011 12:26:05 +0000 http://www.itcsolutions.eu/?p=2211#comment-1360 In reply to Nobin.

I have tried your code with my Web service and everything is working. Check again the permissions. This is my AndroidManifest.xml file:
AndroidManifest.xml

]]>