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

Web and WebWorks Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Trusted Contributor
Posts: 109
Registered: ‎11-15-2011
My Device: blackberry 9800
My Carrier: beginner developer
Accepted Solution

create http client to get data from web service


I'm newbie on workingwith webworks. I have to get data from web service. How can I connect on this service and parse it. There is a tutoriel that can help me to start with it.

Can any one advice me how can I start to work with webworks on blackberry 10

Thanks for any help

Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: create http client to get data from web service

In general you need to use an AJAX call to the server


It really depends on what the server returns as to how easy the information is to digest


JQuery provides a simple interface and returns easy to use information


If you're dealing with XML things can get complicated depending on namespace


If you look at the raw XML and it goes something like fred:name you will have issues that require a SAX implementation - JSON is dead easy if you get that though (nothing too confusing there)


If using an external data source go for JSON if you have the choice


As far as examples go - just look up JQuery Ajax [JSON / XML] and you'll get where you're going rapidly


SAX is a LOT harder owing to the namespace - the most common is Dublin and even XML without namespace is not simple to handle so avoid it if you can

Click the like button if you find my posts useful!
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: create http client to get data from web service

I'm accepting peardox's response as a solution as it outlines the components required to make a web service request via AJAX and provides information about samples.

There is also a basic W3C sample here using AJAX and a PHP server that returns database information:

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.