View Single Post
Old 10-22-2008, 10:31 AM   #1 (permalink)
sickned
Knows Where the Search Button Is
 
Join Date: Oct 2008
Model: 7100T
PIN: N/A
Carrier: Unknow
Posts: 42
Post Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb **** BlackBerry and Ksoap2 Tutorial *****

Please Login to Remove!

I was very, very sick trying to make work the ksoap2's libraries at a BlackBerry app and now I get it, Im gonna make a tutorial for all the people at the forum that have the same problem I had.

Ive used Eclipse and the Blackberry JDE plugin.

First of all, download the ksoap2 library preverified. I've uploaded it in this post.

Then, follow the steps:

- Create a Blackberry library project in your workspace, Ksoap2. (Create a new project->Right click->Project Properties-> Blackberry Project Properties-> Application->Project type->Library
- Create a folder called "lib" at this new library project.
- Copy the ksoap2 preverified at this post to the lib folder. Right click at Eclipse and select "Add to build path".
- Right click on the project->Add file to Blackberry Project-> Select the ksoap2 jar from the "lib" folder.

Now, into your project, in which you wanna use ksoap, do the next:
- Right click on the project -> Properties -> Java Build Path -> Libraries -> Add Jars... select Ksoap2.jar (Project's jar NOT LIBRARY JAR).. ->Ok
- Right click on the project -> Properties -> BlackBerry Project Dependencies -> Select "Ksoap2".

WARNING!!
Sometimes when you add a new library or change something in the build path, you must repeat the last step, because this checkbox get unchecked.

Now, you're ready to write your code.

I've uploaded a simple code sample calling a web service.

I hope this could be useful.

Change: I've re-uploaded the file, because it looks like be corrupted.
Attached Files
File Type: zip Ksoap2LibPrev_and_sample_code.zip (42.8 KB, 4111 views)

Last edited by sickned : 11-19-2008 at 11:06 AM.
Offline   Reply With Quote