ejabberd - Comments for "EJAB-823 mod_pubsub:publish_item" https://www.ejabberd.im/node/3906 en Did The Trick https://www.ejabberd.im/node/3906#comment-55387 <p>Thank you very much - that did the trick and everything is working as expected.</p> <p>John</p> Tue, 09 Mar 2010 16:17:04 +0000 wymanjohnh comment 55387 at https://www.ejabberd.im simple conversion https://www.ejabberd.im/node/3906#comment-55385 <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>When I call Publish_item passing node as:<br /> Node = ["home", "b.pollzer.com", "6", "Test"]<br /> Publish_item receives node as : ["home", "b.pollzer.com", "6", "Test"] </p> <p>When a publish from PSI publish_item received node as:<br /> Node = &lt;&lt;"home/b.pollzer.com/6/Test"&gt;&gt;</p> <p>How do I get the Node to format correctly for the call to publish_item.</p></div> <p>Simple:</p> <pre>$ erl Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false] Eshell V5.7.5 (abort with ^G) 1&gt; list_to_binary(string:join(["home","b.pollzer.com","ccc"], "/")). &lt;&lt;"home/b.pollzer.com/ccc"&gt;&gt; </pre> Tue, 09 Mar 2010 15:08:44 +0000 mfoss comment 55385 at https://www.ejabberd.im Node format https://www.ejabberd.im/node/3906#comment-55384 <p>When I call Publish_item passing node as:<br /> Node = ["home", "b.pollzer.com", "6", "Test"]<br /> Publish_item receives node as : ["home", "b.pollzer.com", "6", "Test"] </p> <p>When a publish from PSI publish_item received node as:<br /> Node = &lt;&lt;"home/b.pollzer.com/6/Test"&gt;&gt;</p> <p>How do I get the Node to format correctly for the call to publish_item.</p> <p>John</p> Tue, 09 Mar 2010 14:57:14 +0000 wymanjohnh comment 55384 at https://www.ejabberd.im Error https://www.ejabberd.im/node/3906#comment-55383 <p>This is the error that I receive. I have some additional debug statements to help me resolve. The second set of messages is what publish_item is receiving from psi when I try to send a publish_item with the xml console. It looks like it is expecting xml and I have tried to create the same xml but still having issues.</p> <p>ERROR:</p> <p>Raw Message: {call,publish_message,<br /> [{struct,[{user,"6"},{channel,"Test"},{data,"This is a test"}]}]}<br /> Filtered Payload: {xmlcdata,"This is a test"}</p> <p>=ERROR REPORT==== 9-Mar-2010::13:34:26 ===<br /> E(&lt;0.381.0&gt;:mod_pubsub_odbc:3553) : transaction return internal error: {aborted,<br /> {badarg,<br /> [{erlang,<br /> binary_to_list,<br /> [["home",<br /> "b.pollzer.com",<br /> "6", "Test"]]},<br /> {mod_pubsub_odbc,<br /> node_to_string,<br /> 1},<br /> {nodetree_tree_odbc,<br /> get_node,<br /> 2},<br /> {mod_pubsub_odbc,<br /> tree_call,<br /> 3},<br /> {mod_pubsub_odbc,<br /> '-transaction/4-fun-0-',<br /> 3},<br /> {ejabberd_odbc,<br /> execute_bloc,<br /> 1},<br /> {ejabberd_odbc,<br /> handle_call,<br /> 3},<br /> {gen_server,<br /> handle_msg,<br /> 5}]}}</p> <p>=ERROR REPORT==== 9-Mar-2010::13:34:26 ===<br /> W(&lt;0.381.0&gt;:ejabberd_xmlrpc:323) : Error -118<br /> A problem '{error,<br /> {xmlelement,"error",<br /> [{"code","500"},{"type","wait"}],<br /> [{xmlelement,"internal-server-error",<br /> [{"xmlns","urn:ietf:params:xml:ns:xmpp-stanzas"}],<br /> []}]}}' occurred executing the command publish_message with arguments<br /> [{user,"6"},{channel,"Test"},{data,"This is a test"}]</p> <p>Valid Send via PSI</p> <p>=INFO REPORT==== 9-Mar-2010::13:38:13 ===<br /> I(&lt;0.398.0&gt;:ejabberd_c2s:825) : ({socket_state,tls,{tlssock,#Port&lt;0.456&gt;,#Port&lt;0.465&gt;},&lt;0.397.0&gt;}) Opened session for 6@b.pollzer.com/JOHN_WYMAN<br /> PubMsg: [{xmlcdata,&lt;&lt;"\n "&gt;&gt;},<br /> {xmlelement,"entry",[],[{xmlcdata,&lt;&lt;"This is a test Message"&gt;&gt;}]},<br /> {xmlcdata,&lt;&lt;"\n "&gt;&gt;}]</p> <p>From PSI I can publish to the node: home/b.pollzer.com/6/Test</p> <p>Thanks,<br /> John</p> Tue, 09 Mar 2010 13:45:18 +0000 wymanjohnh comment 55383 at https://www.ejabberd.im Does it show any error https://www.ejabberd.im/node/3906#comment-55381 <p>Does it show any error message, either in the ejabberdctl shell or in ejabberd log files?</p> Tue, 09 Mar 2010 09:58:50 +0000 mfoss comment 55381 at https://www.ejabberd.im