jQuery in Action, 2nd edition
The moose likes Android and the fly likes facing nullpointerexception while consuming kSOAP2 web service Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Android
Reply Bookmark "facing nullpointerexception while consuming kSOAP2 web service" Watch "facing nullpointerexception while consuming kSOAP2 web service" New topic
Author

facing nullpointerexception while consuming kSOAP2 web service

Anil Deshpande
Ranch Hand

Joined: Jan 13, 2008
Posts: 117
Hi,

I have implimented a SOAP web service using Axis. The web service adds two numbers and returns the sum. The code looks like this.

And I have published the web service and its working fine. If I execute it through Axis framework it's working perfectly fine.
And now I am tring to access the web service through Android Activity

This is the utility interface which contains the constants.


And this is the activity code.



The last line in the code is throwing NullPointerException. I know it's bacause "result" is being initialized to null. My Question is where I am going wrong. Please give me the solution on how to consume a web service which takes parameters and also returns some thing in response.

Thans and Regards,

Anil Deshpande
SCJP 1.5, SCWCD 1.5
 
 
subject: facing nullpointerexception while consuming kSOAP2 web service
 
Threads others viewed
Getting Onle One File when getting reponse through ksoap2 web service.
error while connecting to webservices
Axis2 web service Unknown type problem
SOAP validateUser
Byte[] to image
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture