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

Native Development

Reply
Developer
pawanchowdary
Posts: 22
Registered: ‎07-21-2010
My Device: Z10
My Carrier: T-Mobile
Accepted Solution

Calling an API - Cascades

Hello

 

I'm very new to BB10 and Cascades developement. I wonder is there any sample code availabe to call an API from Cascades dev and i expect return as an XML and i need to parse.

 

example: http://api.example.com/key=123

which will return an xml file back.

 

Any Suggession / sample code.

 

Thanks

Pavan

Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: Calling an API - Cascades

Hey there,

 

Welcome to the forums!

 

I am not sure I understand your question - You want to call an API outside of Cascades from within Cascades and parse a returned XML document. Which API are you trying to call?

 

I am also unable to navigate to the link you provided;

 

Martin

 

Please use plain text.
Developer
pawanchowdary
Posts: 22
Registered: ‎07-21-2010
My Device: Z10
My Carrier: T-Mobile

Re: Calling an API - Cascades

Hello

 

Thanks for the reply,

I'm developing one app using cascades.

I'm need of call an external API example: Example: http://A1111111111.api.wxbug.net/getLocationsXML.aspx?ACode=A1111111111&SearchString=64732

it will return the XML message, and i need to parse and display.

 

 

Please use plain text.
Developer
greenback
Posts: 528
Registered: ‎10-17-2010
My Device: BlackBerry Z10, DAC

Re: Calling an API - Cascades

Hey! I am doing same thing. I found the code posted to my thread very useful. For your case, just replaces JSON data model with XML data model.

http://supportforums.blackberry.com/t5/Cascades-Development/Method-for-making-an-HTTP-style-request-... 

:Rockon: 

Please use plain text.
Developer
pawanchowdary
Posts: 22
Registered: ‎07-21-2010
My Device: Z10
My Carrier: T-Mobile

Re: Calling an API - Cascades

Thanks!

Please use plain text.