**** BlackBerry and Ksoap2 Tutorial *****
1 Attachment(s)
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. |
Quote:
Thanks for your contribution :smile: |
can't see the tag BB project dependencies
i followed the instructions, but i can't see the tag BlackBerry Project Dependencies. I'm using eclipse 3.4, jde 4.6 and your ksoap2 library.
Pls Help :( |
great jobs!
|
Hi,
I'm using ksoap2 library and i want to use the class HttpTransportBasicAuth. I understand that this class is not included in the preverified core ksoap2 library provided above. It is in a separate file called ksoap-extras-2.1.2.jar or something like that, that i downloaded from sourceforge.net I want to use this class in order to authenticate the user trying to access the web service by providing a username and password. I tried to verify this library but it always fails. Can somebody help me on what i should do? Please help! Thanks, Jaclyn |
Quote:
|
Quote:
I was able to run my application already! :) |
Still no luck
First of all, thanks for the tutorial and it gives us a starting point. I have been looking at this for a week now and I still can not get it to work. I can not see "Blackberry project dependencies" and "Add file to project" options. Am I doing something wrong?
Quote:
|
Quote:
|
hey sorry to say m new in this using Ksoap bt i have to do a project in this .
m using ksoap jar file and eclips bt cann't do that ...the library is not supported ...
could u explain me ...previously i have wrked on banking project so m totally blank in using ksoap with blackberry IDE .... plz give me some detail of this .....i used eclips earlier bt can't understand how to relate IDE and eclips plugin .......thanks in advance |
Quote:
|
hi
ksoap2-j2me-core-prev-2.1.2
sir m using ksoap2 preverified jar....kindly help and thanks for ur post |
Quote:
|
hi
thanku sir yes m working in qbit systems in jaipur ...
m reading the link provided by u ..thanks once again sir |
KSOAP problem
i had tried KSOAP2 to run on a Blackberry JDE4.6 but it didnt work fine for me,
i have this code: SoapObject myObject = new SoapObject("http:--ws.test.net", "stringConcat"); HttpTransport transport = new HttpTransport("http:--localhost: 8080-BlackberryWS-BlackberryService"); myObject.addProperty("fname", "my"); myObject.addProperty("lname", "test"); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.setOutputSoapObject(myObject); transport.debug = true; transport.call("stringConcat", envelope); String data = envelope.getResponse().toString(); but DataGramProtocol(ConnectionBase).recieve(DataGram) Source not found problem pops up upon Debug. and as i look at the variables this._connectionHandlerName = "httpc" and this._name = //localhost:8080/BlackberryWS/BlackberryService;ConnectionHandler=httpc but with KSOAP2 SE: the code works fine changing HttpTransport transport = new HttpTransport("http:--localhost: 8080/ BlackberryWS/ BlackberryService"); to HttpTransportSE transport = new HttpTransportSE("http:--localhost:8080/BlackberryWS/BlackberryService"); meaning with blackberry it changes http to httpc.. how can i make it maintain in http? can anybody help? please.. |
I am running into the same problem with not seeing "Blackberry project dependencies" under the project options. Anybody have any ideas?
|
Quote:
|
Quote:
Resources Blackberry Project Properties Builders Java Build Path etc... |
testing webservice on simulator
Hi All,
I have developed a client on BB using ksoap2. I have tried using the MDS simulator along with the device simulator (as mentioned in some post), but whenever i send a request, i get the following Exception: org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <{http://www.w3.org/2003/05/soap-envelope}soap:Envelope>@1:205 in java.io.InputStreamReader@2bdcc2b0) I dunno whats going wrong or how to go about it. Please help. I am developing using the following components: BB OS: 4.1.0 JDE: 4.1.0 ksoap2: lib\ksoap2-j2me-core-prev-2.1.2.jar PS: I can access it through http demo application, but not through my web service. I am pasting my code below: Code:
private String IPorHostname = "http://192.168.1.33"; |
Hi all,
I have solved the above problem. |
All times are GMT -5. The time now is 05:59 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.