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

Posts: 28
Registered: ‎11-13-2012
My Device: none
My Carrier: 27768965251

http connect to php web service



I am currently struggling to figure something out, I've gone through the documentation millions of times, but either i'm blind or something.


I make a call to a php web service that gets data from a sql database, now my issue is, everything works fine, but I don't know how to reformat the data once it's been retreived from the web service.


Can someone please give me a short sample of how to do this, how must the php service format the data:

1) is Json better?

2) How do I write code that handles the json and does like a for each kinda thing?


This is what I currently have. It's formatted for XML, but I'm going to be transforming it into json if it's best.


This is what I currently get from the web service, as I said, how do I transform that?

There has to be a way, I mean, Facebook, twitter etc all work like this.



Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: http connect to php web service

You should parse the XML to extract the text elements and feed this data to your UI, right?


I would use the SAX parser.