BlackBerry Forums Support Community

BlackBerry Forums Support Community (
-   Developer Forum (
-   -   NullPointerException with ksoap2 (

zimmi 11-29-2007 06:09 AM

NullPointerException with ksoap2
hello again,

i try to call a web service from my BB-simulator using ksoap2. i use following code:


SoapObject client = new SoapObject("urn:namespace","Method_name");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

HttpTransport ht = new HttpTransport("");"urn:namespace",envelope);

i get a NullPointerException at
and have no idea why?

please help!

zimmi 11-29-2007 08:32 AM

obviously i'm doing something wrong, but i don't get it...
can somebody please post the code to call this little example webservice:


that would help me alot. thx

zimmi 11-30-2007 02:52 AM

can somebody please help me?

i'm really stuck with this problem.

richard.puckett 11-30-2007 06:59 PM

I hope you're not actually passing in values such as "Parameter_name". :?

Here's a snippet that works with webservicex (not the dotnet "ugly hack" here).


SoapObject request = new SoapObject("http://www.webserviceX.NET", "GetCountryByCountryCode");
request.addProperty("CountryCode", "US");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
HttpTransport ht = new HttpTransport("");"http://www.webserviceX.NET/GetCountryByCountryCode", envelope);
add(new RichTextField("Response: " + envelope.getResponse()));

zimmi 12-03-2007 03:46 AM

thank you very much, richard.

finally i can call my .net web service.

btw: no, i didn't used the values i posted earlier, lol.

All times are GMT -5. The time now is 04:39 PM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.