First we create a QLineEdit for demonstration purpose.
Then we start the XmlRpc Server on port 8080.
In line 3 we register the Method "examples.displaytext" to the QLineEdits slot "setText".
You can now remotely call "examples.displaytext" with a String as parameter and change the content of your LineEdit.

Here we create the client object by passing the server URL to the constructor.
Calling a Method is as easy as passing its name, the arguments and two slots to the "call" method.
The first of the two slots is used to handle the response, the second can be used to catch errors.

Looks easy to get started with? Right, so clone directly from github here:

wiedi:

last.fm support comming to QtMPC - rullzer:

[...] this we found a nice library: libmaia. Beside a small bug I found (which reminds me I have to report it upstream). This works very well. [...]

rullzer:

2008-12-23 21:56:05

I noticed a small error.
You put true/false between the tags. However according to the specs this should just be 0/1

Other than that this is a great lib :D

dz:

2009-03-02 08:41:31

Hi wiedi,

you get a good feedback from everywhere. If the library would be LGPL licensed it would be fantastic. ..

wiedi:

2009-03-08 20:35:18

@rullrer: thanks for reporting, you're right. Will fix that soon.
Nice to see it getting integrated into a great project like QtMPC :)

@dz: I can give you the permission to use it under the LGPL, except for the maiaObject.cpp/.h files.
I think you already tried to contact the original authors - as did I - and did not get any response. :/
So you can either rewrite that part from scratch or use it under the current BSD-style license.

I also have some patches here around for SSL and HTTP-Auth support that I'll merge when I find the time :)

letux:

2009-03-12 07:55:50

Hi wiedi,

really nice lib, but this comment is not new for you ;-)

I modified the following code in the MaiaXmlRpcClient file in the call function:

QHttpRequestHeaderheader("GET",m_url.toEncoded());

In this case, we can call web service by adding some URL parameters sent by GET. I used your lib with a php server web service. Maybe it could be interesting to have the flexibility to set the method and to add post or get parameter.

thanks again

Leland:

2009-11-27 08:00:29

Thanks for the lib!
Just a minor comment though: performance of the lib seems rather slow if there are multiple consecutive calls to the same server. Testing with perl for the same series of calls has a rapid response. In general, with this lib it appears that it seems to wait between 20 and 30 seconds between each call to the same server.

Is this deliberate behaviour, or is there a parameter that can be passed to decrease what appears to be a timeout limit?

Thanks,

L.

Leland:

2009-12-04 07:26:51

Just another note.. our XMLRPC responses include some text in UTF-8 encoding from the server (server is not based on libmaia). However, rendering the text on the client side using libmaia has a character encoding issue and cannot be displayed properly.

Martin Scheffler:

2010-02-10 15:54:53

Hi, got another small fix.

WS-XMLRPC sends strings as mytext instead of mytext which they say is valid syntax.

Leland:

2010-10-25 08:23:46

Is there any plan to include HTTPS/SSL support with this lib? I have an application that requires (obligatory) the XMLRPC session to be over HTTPS. Despite passing the URL as https, it still tries to connect using http.

Thanks,

Leland

Leland:

2010-10-25 11:23:52

Managed to patch it for the client side myself. Weidi, can I submit a patch to you for this?

wiedi:

2010-10-25 23:30:40

@Werner:
allowedAddresses wird jetzt immer auf NULL gesetzt.

@Leland:
HTTPS/SSL support for the server would be nice. I'll look into it if I find the time.
The more recent versions of the client should already support SSL by just passing the URL with the https schema. Can you retry with the current version from svn please?
I'll reply to your emails in a second :D

chapman55k:

Your stuff is great. Got it downloaded an up and running (client only) in a couple of hours. Congratulations, you have provided a great little library. I will be back.

XML-RPC with Qt4 - XML Tutorial:

2011-06-13 15:16:45

[...] Here is a good tutorial show you about XML-RPC with Qt4: So, now that my exams are all done I finally found some time to put up a library you might find useful. Two semesters ago Karl Glatz and I both needed a XML-RPC library for Trolltechs Qt 4. [...]