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. Desire ROM; Oxygen v0.1.3 BETA (FROYO 2.2.1|2 .6.35.8 BFS/BFQ/ SVS-OCUV|FM|55MB

[ROM-AOSP] Oxygen v0.1.3 BETA
(FROYO 2.2.1|2 .6.35.8 <tel:26358> BFS/BFQ/SVS-OCUV|FM|55MB)

Download Oxygen v0.1.3
http://goo.gl/vjmI0



-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

2. Leather Case Samsung Spica (Free Screen Protector) MURAH

Hi Mods,
Numpang bandwith untuk jualan acc Samsung Spica (Leather Case bonus Screen
Protector).

------------------------------
-----------------------------------------------------------------------------------------------------------

Dijual Leather Case untuk Samsung Galaxy i5700 SPICA

Harga 100rb

FREE :
- ongkir Jabodetabek (via JNE)
- Screen Protector u/ SPICA as attached

Foto :
http://u.kaskus.us/44/wpx1tkkm.jpg
http://u.kaskus.us/44/5b99iywd.jpg
http://u.kaskus.us/44/bowr07tj.jpg
http://u.kaskus.us/44/mmxkhbjv.jpg
http://u.kaskus.us/44/1cykvee8.jpg
http://u.kaskus.us/44/meufoq4c.jpg
http://u.kaskus.us/44/mjutvkl0.jpg
http://u.kaskus.us/44/jd86uxso.jpg

Hubungi :
PM : ariak...@reader.chip.co.id
HP : 08999-035629

Thanks.

BR.Aria

-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

3. Desire ROM; RoDrIgUe ZsTyLe鈩?MIUIMOD | BLAZING FAST & STABL

4. Desire ROM; RoDrIgUeZsTyLe鈩?M IUIMOD | BLAZING FAST & STABLE

5. Help.gagal app2sd

6. 3d mmo bwat android

7. AVD cursor