XML-RPC

BlitzMax Forums/Brucey's Modules/XML-RPC

Htbaa(Posted 2009) [#1]
Hey Brucey,

What about an XML-RPC module? Using something like xmlrpc-epi. Its cross-platform compatible so all the BlitzMax platforms could use it. It being a C library should make it easier to wrap it up then a C++ library would, right?

I gave it a shot myself and got at the point where all my BlitzMax code and the external libraries are compiling nicely. However, after beginning with implementing it all I soon ran into memory access violations. At some points I do get an pointer to an object back, and in the next call it's supposedly gone... I had these funny errors before when interfacing with a small C++ library and once again I must conclude I've failed miserably.

Or maybe you can give me some hints in the right direction. I really would've liked it to have this as a side project, but if it's already failing in such an early stage and giving me headaches, then I'm not sure if I should carry on with what I'm doing.

XMLRPC-EPI would allow us to create XML-RPC servers and clients. It doesn't come with a transport layer, but we could provider those ourselves (Socket, cURL etc.).

When being able to use XML-RPC BlitzMax programs could easily communicate with web services. For example, high scores and leaderboards! As creating a XML-RPC server in PHP or Perl is already dead-easy with the amount of libraries around there.

Edit: Wait! I'm getting some progress! :-) Memory bug seems to be solved. Only having some problems with passing strings to a C library.

Edit 2: And now I was actually able to create an XML request :-).


Htbaa(Posted 2009) [#2]
I'm going to use Git for my public libraries (htbaapub.mod). I want to open a new post about my XML-RPC module in the appropriate forum, but where would that be here on the BlitzMax forums? The BlitzMax Module Tweaks is only for the official modules. Should it be in BlitzMax Programming? I won't post it to the Code Archives as it just has a too big codebase.

----------

Ok, added a repository to Github: http://github.com/Htbaa/htbaapub.mod/tree/master

There is some working code around there, but it's FAR from complete yet though. I'll continue it tomorrow :-)


Brucey(Posted 2009) [#3]
Good work!


Htbaa(Posted 2009) [#4]
Thanks! I figured out how to read data back from a response so it's progressing really well already. There's still a lot more to do, but I'll keep you guys posted :-).

Edit: And now response data from the XML-RPC server can now be accessed through its own type TXMLRPC_Response_Data. Yay :-)


Htbaa(Posted 2009) [#5]
I also made a demo with a GUI. It's all progressing very nicely.

I still have the occasional, strange and random memory violation issues which need to be sorted out. Once I get those fixed the Client part would be done for the biggest part. But I'm getting there :-).


Htbaa(Posted 2009) [#6]
For anyone watching this; check this topic