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
Posts: 74
Registered: ‎12-17-2009
My Device: Z30
My Carrier: O2

Sql and Web Service

Hi, I have researched for hours on the subject but I am still at a loss over what to do. I have some really noob questions which I hope someone can help with!

 

Basically, I would like to connect to an SQL database, through a Web Service. I have tried this before in ASPX .Net but I am not sure how similar they are in Cascades.

 

Unfortunately I really could not find any examples/proper tutorials to show me exactly what I should be expecting. Can someone please just give an example of the whole structure?

 

1) What the code in Cascades as to how to call and retrieve the values?

 

I have found this http://supportforums.blackberry.com/t5/Native-Development-Knowledge/Using-XMLHttpRequest-from-QML-in... but I could not find any other information to explain how to receive/submit/edit data. [Sorry I am a real noob here].

 

Would appreciate it if someone can point me to the right direction to find out more. I have seen some tutorials on w3.com but I am not sure how applicable they are to Cascades/javascript.

 

2) my data is in sql, do I need to convert it to Json or something first (as per example above)? If so, how am I supposed to do so?

 

2B) How am I supposed to process the data that I receive/submit? Do I just map them to a QMap or access them directly? 

 

3) Are 'web service' kinda standardised? Such that it will be similar to what I have been doing on aspx.net? How should I return the values? Can someone please give an example of how a function might look on it?

 

What programme can I use to do it? Will Visual Studio do? Is it different from creating a web service for a web application?

 

4) Is the SOAP sample relevant to what I am looking for? 

 

 

Thanks in advance!

 

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

Re: Sql and Web Service

1) Usually you use a library for webservices. For a simple webservice i suggest QtSoap
2) Your data is in the format you retrieve it (soap xml). QtSoap allows access similar to json.
3) yes, web services are standardised, at least if they offer SOAP
4) yes
----------------------------------------------------------
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
Developer
Posts: 74
Registered: ‎12-17-2009
My Device: Z30
My Carrier: O2

Re: Sql and Web Service

Thank you for clearing up certain things for me!!

 

Is the QtSoap referring to an actual UI manager? I found a few including QSoapMan, SoapUI, EasySoap++; which would you recommend as the most compatible with Cascades?

 

Also, I assume SOAP is the actual format the data is being transferred? What would the the actual language that is processing it on the server side? (Sorry if this question sounds too silly! :s)

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

Re: Sql and Web Service

no, QtSoap is a library for bb10.
You can use SoapUI and the like to consume webservices from your PC, which is helpful if you are not sure how a request should be done or if you want to compare the code generated by your software with the one generated by the tool.

SOAP is the protocol in which data is transferred. The server-side language does not matter as the output is standardized.
----------------------------------------------------------
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
Developer
Posts: 74
Registered: ‎12-17-2009
My Device: Z30
My Carrier: O2

Re: Sql and Web Service

Smiley Embarassed I see. Thanks! Will check it out now!