Erlang Mailing Lists

Author Message

<  Ejabberd mailing list  ~  mod_xmlrpc

Guest
Posted: Tue Mar 16, 2010 11:25 pm Reply with quote
Guest
Hello,

I'm trying to get mod_xmlrpc installed on my server. I'm using Windows
2003 and ejabberd-2.1.2.

I checked out the source for ejabberd-modules and compiled mod_xmlrpc
using build.bat. Then copied mod_xmlrpc.beam to "C:\Program Files
(x86)\ejabberd-2.1.2\lib\ejabberd-2.1.2\ebin" and added "{mod_xmlrpc,
[]}," to the ejabberd.cfg file.

After restarting the service I checked the port and nothing responds.

Checking the log shows this:

=ERROR REPORT==== 2010-03-16 16:17:10 ===
E(<0.36.0>:gen_mod:73) : {undef,
[{xmlrpc,start_link,
[all,4560,10,5000,
{mod_xmlrpc,handler},
started]},
{mod_xmlrpc,start,2},
{gen_mod,start_module,3},
{lists,foreach,2},
{ejabberd_app,start,2},
{application_master,start_it_old,4}]}


Any ideas?


Thanks in advance,
--
Mitchel Constantin
Weavver, Inc.
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist
Guest
Posted: Wed Mar 17, 2010 9:24 am Reply with quote
Guest
Mitchel,

Look at the README.txt for mod_xmlrpc and you'll see the section REQUIREMENTS which explains about getting the xmlrpc library and changing the command line for erl to use it...


HOWEVER, if I remember correctly mod_xmlrpc has actually been deprecated by ejabberd_xmlrpc (part of ejabberd main distribution instead of an external module) ?? so you might want to look at that.


Cheers


Kirk

On 16 March 2010 23:25, Mitchel Constantin <mythicalbox@weavver.com (mythicalbox@weavver.com)> wrote:
Quote:
Hello,

I'm trying to get mod_xmlrpc installed on my server. I'm using Windows
2003 and ejabberd-2.1.2.

I checked out the source for ejabberd-modules and compiled mod_xmlrpc
using build.bat. Then copied mod_xmlrpc.beam to "C:\Program Files
(x86)\ejabberd-2.1.2\lib\ejabberd-2.1.2\ebin" and added "{mod_xmlrpc,
Guest
Posted: Wed Mar 17, 2010 9:58 am Reply with quote
Guest
For 2.1.x you should use ejabberd_xmlrpc module in module
Guest
Posted: Wed Mar 17, 2010 8:46 pm Reply with quote
Guest
Hey Guys,

Thank you for pointing me in the right direction. I guess I was
confused over which module superseded which (ejabberd_xmlrpc vs
mod_xmlrpc).

Here are a few notes for other users:

Build:
To build ejabberd_modxml unless erl is in your path you need to modify
build.bat to point to your erl.exe:
"C:\Program Files (x86)\erl5.7.5\bin\erl" -pa
../../ejabberd-dev/trunk/ebin -pa ebin -make

Copy the ejabberd_modxml.beam file to "C:/Program Files
(x86)/ejabberd-2.1.2/lib/ejabberd-2.1.2/ebin/."

>From the instructions:

Step 1: Finding the link on the download page for the compiled
binaries is confusing, look next to "Requirements" at the top where it
says "you can get it compiled for.." for the link.

I copied the contents to "C:/Program Files
(x86)/ejabberd-2.1.2/lib/xmlrpc-1.13-compiled".

Step 2: On Windows when you add the "-pa" look in bin/ejabberdctl in
"start()", I added it like so:

exec $ERL $NAME $ERLANG_NODE $ERLANG_OPTS \
-noinput -detached \
-mnesia dir "\"$EJABBERD_DB\"" \
-s ejabberd \
-pa "C:/Program Files
(x86)/ejabberd-2.1.2/lib/xmlrpc-1.13-compiled/r13b01-5.7.2" \
-ejabberd config \"$EJABBERD_CONFIG_PATH\" \
log_path \"$EJABBERD_LOG_PATH\" \
-sasl sasl_error_logger \{file,\"$SASL_LOG_PATH\"\}


Cheers,
Mitchel Constantin

On Wed, Mar 17, 2010 at 2:57 AM, Zhan iJab <zhancaibao@gmail.com> wrote:
> For 2.1.x you should use ejabberd_xmlrpc module in module
Guest
Posted: Wed Mar 17, 2010 9:41 pm Reply with quote
Guest
Started testing xmlrpc with my code. Currently I'm seeing the
following in erlang.log:

=CRASH REPORT==== 17-Mar-2010::14:34:40 ===
crasher:
pid: <0.532.0>
registered_name: []
exception error: undefined function xmerl_scan:string/1
in function xmlrpc_decode:payload/1
in call from xmlrpc_http:handle_payload/5
in call from tcp_serv:start_session/3
initial call: tcp_serv:start_session(<0.378.0>,
{xmlrpc_http,handler,
[5000,
{ejabberd_xmlrpc,handler},
{state,[],noauth,false}]},
#Port<0.426>)
ancestors: [<0.378.0>,ejabberd_listeners,ejabberd_sup,<0.36.0>]
messages: []
links: [<0.378.0>,#Port<0.585>]
dictionary: []
trap_exit: false
status: running
heap_size: 610
stack_size: 23
reductions: 611
neighbours:


The xmlrpc method I'm trying is "status". A copy of the POST from
wireshark is as follows:

POST /RPC2 HTTP/1.1
Content-Type: text/xml
User-Agent: XML-RPC.NET
Host: 192.168.0.10:4560
Content-Length: 99
Connection: Close

<?xml version="1.0"?>
<methodCall>
<methodName>status</methodName>
<params />
</methodCall>

Is there anything obvious I'm missing? This seems like a version
mismatch or code error.

Thanks again,
Mitchel Constantin

On Wed, Mar 17, 2010 at 1:45 PM, mitcheloc <mitcheloc@gmail.com> wrote:
> Hey Guys,
>
> Thank you for pointing me in the right direction. I guess I was
> confused over which module superseded which (ejabberd_xmlrpc vs
> mod_xmlrpc).
>
> Here are a few notes for other users:
>
> Build:
> To build ejabberd_modxml unless erl is in your path you need to modify
> build.bat to point to your erl.exe:
> "C:\Program Files (x86)\erl5.7.5\bin\erl" -pa
> ../../ejabberd-dev/trunk/ebin -pa ebin -make
>
> Copy the ejabberd_modxml.beam file to "C:/Program Files
> (x86)/ejabberd-2.1.2/lib/ejabberd-2.1.2/ebin/."
>
> From the instructions:
>
> Step 1: Finding the link on the download page for the compiled
> binaries is confusing, look next to "Requirements" at the top where it
> says "you can get it compiled for.." for the link.
>
> I copied the contents to "C:/Program Files
> (x86)/ejabberd-2.1.2/lib/xmlrpc-1.13-compiled".
>
> Step 2: On Windows when you add the "-pa" look in bin/ejabberdctl in
> "start()", I added it like so:
>
> exec $ERL $NAME $ERLANG_NODE $ERLANG_OPTS \
>
Guest
Posted: Wed Mar 17, 2010 11:42 pm Reply with quote
Guest
2010/3/17 mitcheloc <mitcheloc@gmail.com>:
> Started testing xmlrpc with my code. Currently I'm seeing the
> following in erlang.log:
> =CRASH REPORT==== 17-Mar-2010::14:34:40 ===
> crasher:
> pid: <0.532.0>
> registered_name: []
> exception error: undefined function xmerl_scan:string/1
> in function xmlrpc_decode:payload/1
> in call from xmlrpc_http:handle_payload/5
> in call from tcp_serv:start_session/3


ejabberd_xmlrpc requires xmlrpc, which you installed.
xmlrpc requires xmerl, which is included in the standard Erlang/OTP.

However, the ejabberd binary installers doesn't include all Erlang/OTP
(which is 80 MB), only the barely minimum to get the mainline ejabberd
running.
You probably don't have xmerl installed.

So, you have to add another step to your installation guide:
Install Erlang/OTP and copy the xmerl*.beam files.


---
Badlop
ProcessOne
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist
Guest
Posted: Fri Mar 19, 2010 2:53 am Reply with quote
Guest
Badlop,

This is what I see now:


POST /RPC2 HTTP/1.1
Content-Type: text/xml
User-Agent: XML-RPC.NET
Host: 192.168.0.10:4560
Content-Length: 99
Connection: Close


<?xml version="1.0"?>
<methodCall>
Guest
Posted: Fri Mar 19, 2010 12:00 pm Reply with quote
Guest
2010/3/19 mitcheloc <mitcheloc@gmail.com>:
> Error
> -112
> Unknown call:
> {call,status,[]}</string></value></member></struct></value></fault></methodResponse>
> Could this be an error with the xmlerl version (1.2.4) I copied over? The
> "status" command should be working, it's available when I check the
> ejabberdctl arguments.


Simple: ejabberd_xmlrpc expects that you always provide one parameter
with a struct.

For example, status call:
<methodCall>
<methodName>status</methodName>
<params>
<param>
<value>
<struct></struct>
</value>
</param>
</params>
</methodCall>

Try this example python script, which makes two calls:

---------------------------
import xmlrpclib

server_url = 'http://127.0.0.1:4560';
server = xmlrpclib.Server(server_url);

# This would fail:
# result = server.status()

params = {}
result = server.status(params)
print result

params = {}
params["host"] = "localhost"
result = server.registered_users(params)
print result
---------------------------

For me it returns:

$ python test.py
{'res': 0, 'text': 'The node ejabberd@localhost is started. Status:
startedejabberd 2.1.3 is running in that node'}
{'users': [{'username': 'test1'}, {'username': 'test2'}, {'username': 'test3'}]}


---
Badlop
ProcessOne
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist
Guest
Posted: Fri Mar 19, 2010 5:39 pm Reply with quote
Guest
Thank you, that did the trick. In order to access "send-message-chat" I installed mod_admin_extra as well.

I've attached an example of using the API with C#.

On Fri, Mar 19, 2010 at 5:00 AM, Badlop <badlop@gmail.com (badlop@gmail.com)> wrote:
Quote:
2010/3/19 mitcheloc <mitcheloc@gmail.com (mitcheloc@gmail.com)>:
> Error
> -112
> Unknown call:
> {call,status,[]}</string></value></member></struct></value></fault></methodResponse>
> Could this be an error with the xmlerl version (1.2.4) I copied over? The
> "status" command should be working, it's available when I check the
> ejabberdctl arguments.



Simple: ejabberd_xmlrpc expects that you always provide one parameter
with a struct.

For example, status call:
<methodCall>
wuji
Posted: Thu Aug 23, 2012 7:51 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
violent crimes online.Delfino Mora's family said that he was collecting collecting [h3]cheap polo shirts[/h3] collecting cans in an alley on the Rogers Park neighborhood
Chicago on July 10 when prosecutors say he was attacked attacked [h2]replica Christian Louboutin[/h2] attacked by Malik Jones, 16, Nicholas Ayala, 17, and Anthony
18.Ayala and Malcolm were denied bail today. Jones had previously previously cheap polo shirts previously been denied bail.Mora was found unconscious but breathing just
8 a.m. by a passerby, but he died seven hours hours discount designer *beep* hours later as a result of blunt head trauma endured
the attack, police said."I think they are heartless," the victim's victim's red bottom shoes victim's son Jose Mora said to ABC News Chicago affiliate
"Why they would do this to a guy, older guy, guy, replica designer bags for sale guy, 62? You know, I don't know. It is so
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum