Joomla 1.7 and XMLRPC Component

243 views
Skip to first unread message

Gourky

unread,
Sep 15, 2011, 3:17:35 PM9/15/11
to Joomla! General Development
Hello,

I am switching from J1.5 to J1.6. I made an xmlrpc plugin for j1.5.
Now that I am running j1.6, I started to write a component using the
documentation from http://docs.joomla.org/Xml-rpc_changes_in_Joomla!_1.6
and its example. I am relatively new to php language. So I first spent
some hours trying to run the sample without success. Very frustrating
as I did not find anything about j1.6 and xmlrpc. Then I found the
problem, looking at the JController.php code... The php is missing
after the <? in files example.php and example.xmlrpc.php. Grrrr. So it
could not instantiate the class. Well I can now call the method
example.test and return what I want as an answer. What I cannot do,
find, is how to get the parameters.
I first had parameters to the method : example.test($my_data), do the
same in my application to format the xml request with the my_data
value. But $my_data is always empty. My request works with the plugin
from th j1.5.
Because I am sending an xml/text with the POST command, I tried to get
the xml attached to the request to parse it myself. I thought the
variable $_FILES would have the xml file but, it stays empty.

I looked at the code of the xmlrpc component from the MovableType blog
for j1.6 but they are not using the component as they should because
they in fact instantiate in the component the plugin from the j1.5 so
it does not give me any answer.

So I probably mist something but I need your help. If someone as an
answer, it would be good to update the missing info from the doc as
well.

Antonio Duran

unread,
Sep 15, 2011, 4:13:42 PM9/15/11
to joomla-de...@googlegroups.com
Hi.

Just thought you may find this useful: I am the developer of Joomdle (http://www.joomdle.com), a extension to integrate Joomla and Moodle, using XMLRPC.

I already migrated it to J1.6/1.7, so maybe you could re-use  the code, or at least it may help you get started. The file to look is /components/com_joomdle/controllers/ws.xmlrpc.php

Let me know if you having any questions about it.

Regards,
Antonio

2011/9/15 Gourky <in...@ggsoft.fr>

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.


Thomas Gourgnier

unread,
Sep 16, 2011, 9:36:05 AM9/16/11
to Joomla! General Development
Thank you for the answer. It helped me a lot. I understood that you
register the webmethod and parse the file from http://input.
Up to now, I could not get anything from the http://input on my local
server even with the variable always_populate_raw_post_data
set to on in the php.ini file.
Then I uploaded it to my test site, but apparently the xmlrpc library
is not installed. So I will come back to you when I will be able
to run it, and maybe create a full component example for others.

Thank you,

Thomas

Thomas Gourgnier

unread,
Sep 19, 2011, 5:16:24 AM9/19/11
to Joomla! General Development
Hello,

I found why I had nothing in 'http://input'. My request was like :
http://www.example.com/index.php?option=com_xmlrpctest&task=example.server&format=xmlrpc

but my site has multi-language support, so you must had a language
code:
http://www.example.com/index.php/en?option=com_xmlrpctest&task=example.server&format=xmlrpc

I will be able to go on.

Thank you

On 16 sep, 15:36, Thomas Gourgnier <i...@ggsoft.fr> wrote:
> Thank you for the answer. It helped me a lot. I understood that you
> register the webmethod and parse the file fromhttp://input.
> Up to now, I could not get anything from thehttp://inputon my local

Antonio Duran

unread,
Sep 22, 2011, 8:17:56 AM9/22/11
to joomla-de...@googlegroups.com
Great to know you got it working.

Thanks for the explanation, I am sure that info will come handy at some point in the future.

Regards,
Antonio

2011/9/19 Thomas Gourgnier <in...@ggsoft.fr>
Reply all
Reply to author
Forward
0 new messages