Question of using ksoap for android to call webservices

by Dave Shen » Fri, 07 Jan 2011 02:32:32 GMT


Sponsored Links
 I am trying to develop an android application using our webservice.

Here is the code:

        private String SOAP_ACTION= "http://.../TestFunction";
        private String METHOD_NAME = "TestFunction";
        private String NAMESPACE = "http://.../";
        private String URL = "http://.../webservice.php";

                   SoapObject request = new SoapObject(NAMESPACE,
METHOD_NAME);
        SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.setOutputSoapObject(request);

        HttpTransport  androidHttpTransport = new HttpTransport(URL);
        androidHttpTransport.call(SOAP_ACTION, envelope);


The testfunction is a function without any parameters or return
values. It is tested correctly using other applications.
As long as calling to the last line of code, the emulator exited.
I tried Eclipse, Ksoap2 in both Windows and Ubuntu.

Can anyone help? Many thanks!

Some small questions:
1) do i need to use "....php?wsdl" in URL?
2) do i need to use explict IP address in URL?
3) should I use androidhttptransport? Is it in the ksoap for android?
i downloaded but the JAR generates a compile error.
4) Is there any specific requirement for the webservices?

-- 



Other Threads

1. CyanogenMod-4.2.6 is out

Langsung aja unduh di 
http://n0rp.chemlab.org/android/update-cm-4.2.6-signed.zip.
--~--~---------~--~----~------------~-------~--~----~
=========================
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:

Click  

2. Eclair Eugene ASOP15

Bro SA, gmail si amplop merah harusnya push dia..ga pake waktu buat narik 
email...

barusan check tritnya..harusnya sync buat mail dan contatcs work! Krn dia buang 
sync calendar..jadi calendar tidak akan pernah tersymc di rom ini..tapi sync 
email dan contatcs harusnya jalan..

Selama rom eclair bugs yg paling gw pentingin di sync issue ini..karena dia 
menghabiskan batre kalo ga di turn off, kalo di turn off maka gmail ga jalan..
--
Sent from my Android phone with K-9. Please excuse my brevity.
--~--~---------~--~----~------------~-------~--~----~
=========================
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:

Click  

3. how about real time request in android kernel?

4. acquire wake lock on rx path (WAS gsm modem during suspend)

5. Any difference between 2.6.27 and 2.6.29 Android changes to kernel

6. Handeling two galleries from each other.

7. Is adb opened on android products?