XMLRPC for iOS?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mkalkbrenner
Posts: 2
Joined: Tue Sep 10, 2013 4:42 pm

XMLRPC for iOS?

Post by mkalkbrenner » Tue Sep 10, 2013 4:49 pm

I just noticed that the revXMLRPC library is not available when building standalone apps for iOS.
Does anyone know a substitution or a workaround to do XMLRPC on iOS using livecode?

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: XMLRPC for iOS?

Post by bangkok » Tue Sep 10, 2013 5:07 pm

mkalkbrenner wrote:I just noticed that the revXMLRPC library is not available when building standalone apps for iOS.
Does anyone know a substitution or a workaround to do XMLRPC on iOS using livecode?
I know nothing about the IOS platform... But it should be easy to "mimick" the revXMLRPC library.. just compose the text of your XML query, with all the proper tags... set your http headers and do a POST to the server.

Official specs :

http://xmlrpc.scripting.com/spec.html

mkalkbrenner
Posts: 2
Joined: Tue Sep 10, 2013 4:42 pm

Re: XMLRPC for iOS?

Post by mkalkbrenner » Tue Sep 10, 2013 5:21 pm

bangkok wrote:But it should be easy to "mimick" the revXMLRPC library
Yes, sending a request this way is possible. But you also have to deal with headers, deal with entities, parse the result and handle xmlrpc error codes by yourself ... something I want to avoid.
Using revXMLRPC for desktop apps is straight forward. Does anyone know why it's not available for iOS?

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: XMLRPC for iOS?

Post by bangkok » Wed Oct 02, 2013 11:02 am

Well... i face now the same question... but for Android ! :shock:

I forgot to check... and it seems that XMLRPC is not available for Android.

And it bother me to "emulate" with a POST...

Someone has information on the avaibility of XMLRPC for mobile ?

I've tried to bypass the problem by using a JSON query...

Bam another library not available for Android : libURLLastRHHeaders (to catch a cookie set by the server).

A real unlucky day...

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: XMLRPC for iOS?

Post by bangkok » Thu Oct 03, 2013 4:12 pm

Well... I've installed Fiddler... A very good proxy traffic analyser.

On desktop, i launch the XMLRPC queries from LiveCode. And Fiddler gives the header, the query in XML, and the result (in several format, raw text, XML etc.)

Then after on Android it's easy to use those items and to :

-set the httpheaders (only the "Content-Length:" will change for each query, easy to calculate)
-and post the raw XML to the server

Actually, for a few "static" queries, or with a only few small changes, it's pretty straightforward.

After, to parse the result, and to inject it for instance in Datagrid with DGData there is the excellent ConvertXMLToArray set of functions from Trevor DeVore, or the XML library (more difficult to use).

Post Reply