Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 13
Registered: ‎11-28-2011
My Device: 8110
My Carrier: Airtel

Calling a webservice in Blackberry

I have a webservice written using PHP. The url of the webservice is available. I want to call the webservice from the Blackberry code. How can I do this?

Regards

-Rama G-

Developer
Posts: 16,851
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Calling a webservice in Blackberry

you can use stubs or ksoap2 (an external library).
use the search for each of these topics to find many posts about it.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Highlighted
Developer
Posts: 208
Registered: ‎08-04-2009
My Device: Not Specified

Re: Calling a webservice in Blackberry

It depends on what type of websevice you have created.

Developer
Posts: 16,851
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Calling a webservice in Blackberry

jitendrasharma is correct, of course.
stubs/ksoap are for SOAP webservices.
for REST you can use JSON, available as a library (integrated since OS 6).
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
Posts: 13
Registered: ‎11-28-2011
My Device: 8110
My Carrier: Airtel

Re: Calling a webservice in Blackberry

It is a SOAP webservice

Regular Contributor
Posts: 59
Registered: ‎06-10-2011
My Device: 4.7
My Carrier: BB

Re: Calling a webservice in Blackberry

Developer
Posts: 128
Registered: ‎11-05-2009
My Device: 9700
My Carrier: 9700

Re: Calling a webservice in Blackberry

U can use Ksoap2 

 

 

Contributor
Posts: 13
Registered: ‎11-28-2011
My Device: 8110
My Carrier: Airtel

Re: Calling a webservice in Blackberry

I used the KSOAP2 library. When the program is run, I get an error saying "Module KSOAP2" not found. I googled for the solution, I got to know that jar file has to be pre-verified or cod file has to be installed. I am unable to get the cod file or the pre-verified file. Is there any solution/alternative approach? 

Developer
Posts: 16,851
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Calling a webservice in Blackberry

the source code of ksoap2 is freely available, you can compile it as a library (create a project in eclipse, set type to library) and use it.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter