[Gambas-user] Web Services: Working with WSDL

birchy pokerbirch at ...1601...
Fri Nov 21 05:05:24 CET 2008


I've done some further research into adding SOAP capabilities to Gambas and
have discovered the gSOAP open source library which is a C library. It is
well documented, cross platform, and available in many Linux repositories,
including Ubuntu and other Debian packages. What gSOAP does is, it takes a
WSDL file (either a http or a local file) and generates a C/C++ header from
it. It then compiles a set of C/C++ class files for use within a project AND
a full set of request and response XML files, like the one i posted above.

Now i'm quite new to Gambas, i've never used XML/DOM, and the gb.xml
documentation is not yet available...but i think the addition of SOAP
services would be quite a simple task for someone familiar with XML, DOM,
and C code.

My very rough proposal is:

1) add gSOAP to Gambas as gb.WebServices or perhaps include it in gb.Web

2) allow users to create a WebService object:
    DIM ws AS NEW WebService

3) specify the WSDL file (which may be local or remote) something like:
    ws.WSDL.URL = "https://api.betfair.com/global/v3/BFGlobalService.wsdl"
(or)
    ws.WSDL.FILE = "~/BFGlobalService.wsdl"
    maybe it would be better to specify the WSDL like this?:
    DIM ws AS NEW
WebService("https://api.betfair.com/global/v3/BFGlobalService.wsdl")

4) pass the WSDL location into gSOAP and let it create the C/C++/XML files
    Note that gSOAP can't directly handle https, so it may be better to
download ALL files via WGET or similar and pass them as a local file?

5) only the xml files are relevent, so the C++ files can be deleted (unless
these are easier to work with/can be directly converted into Gambas
syntax??)

6) wrap the xml files into single functions within the WebService class,
similar to the code in my previous post

7) add a http function to the WebService for the request/response stuff
(curl HttpClient?)

Looking at what i've just written, it may be easier to just let gSOAP do its
thing and then just convert the C classes into Gambas classes? I'm just
stabbing in the dark as i know nothing about the development of Gambas.
-- 
View this message in context: http://www.nabble.com/Web-Services%3A-Working-with-WSDL-tp20328779p20614928.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list