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
nareshkodumuri
Posts: 125
Registered: ‎04-28-2012
My Device: BlackBerry 9800

How to parse wsdl file...?

Hi,

 

    I want to parse a WSDL file.Please give me a sample to parse a WSDL file.

 

 

regards,

Naresh Kodumuri.

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to parse wsdl file...?

what exactly do you want to achieve?
a wsdl is basically xml, so you could use a standard xml api to parse it.

if you want to use a webservice you can take a look at gsoap, it allows code generation:
http://supportforums.blackberry.com/t5/Cascades-Development-Knowledge/Using-gSoap-in-a-Cascades-C-pr...
----------------------------------------------------------
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
raju504
Posts: 86
Registered: ‎05-21-2012
My Device: Blackberry 10 Dev Alpha

Re: How to parse wsdl file...?

Hi simon_hain!

 

    I need to get response from SOAP web service. And the source provided is the WSDL file url. Where can I find the gSoap library and how to set up the credentials in IDE?  Please guid me with detailed steps to be followed.....

 

Thanks in advance!!!

 

 

- Regards

  Raju

- Raju
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to parse wsdl file...?

I would first think about the complexity of the webservice.
If it is a rather easy one, with maybe a couple methods and classes, I would suggest to use QtSoap (which i use in my current project).
You can find a brief sample at http://doc.qt.digia.com/solutions/4/qtsoap/qtsoaphttptransport.html
more is available online from nokia etc.

For a more complex project, most likely my next, gsoap would be better due to code generation. The link i already posed should get you started.
----------------------------------------------------------
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
raju504
Posts: 86
Registered: ‎05-21-2012
My Device: Blackberry 10 Dev Alpha

Re: How to parse wsdl file...?

             But  the web service that I am trying to hit, gives json data as a response.... If I use QtSoap library I won't get the response in json format, I will be in xml format...! If it is possible to get response with gSoap or QtSoap libraries... Can you please give an example for setting up the project and using those libraries.....!

 

 

Thanks.

 

- Regards

  Raju

- Raju
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to parse wsdl file...?

for a JSON REST service you would need WSDL 2.0, i have to pass there, not my field of expertise.
Are you sure you have a wsdl for a json webservice?
----------------------------------------------------------
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
nareshkodumuri
Posts: 125
Registered: ‎04-28-2012
My Device: BlackBerry 9800

Re: How to parse wsdl file...?

[ Edited ]

HI simon_hain,

 

                       Thanks for ur reply.I need to handle SOAP webservice,Now I want to know "how to create Soap request and how to retrieve response".U suggested to use gsoap or QtSoap and i am unable to link that library with the project.If u have any samples using gSoap or QtSoap please provide it.

 


Regards,

Naresh Kodumuri.

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to parse wsdl file...?

you can download qtsoap here:
http://qt.gitorious.org/qt-solutions/qt-solutions/trees/master/qtsoap
(or maybe https://github.com/commontk/QtSOAP ?)

for a sample discussion check
http://www.qtcentre.org/threads/49271-Looking-for-easy-to-learn-from-Qt-SOAP-examples-and-did-I-inst...

In my project i created a qtsoap folder, put the cpp and h file in it and the utility files as well and added the folder in the project file.
I am using it as in the sample.

As far as gsoap is concerned: Read the link i posted above.
----------------------------------------------------------
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