Question

I'm playing around with strophe and Openfire 3.7.1 (with user-service and monitoring plugin).

I've read in http://xmpp.org/extensions/xep-0136.html (7.2 Retrieving a Collection) that I could retrieve archived messages. I've installed the monitoring.jar plugin to my openfire server and I enabled archiving. I've read that I need open archiving to query archives, but this functionality is already in Monitoring plugin.

to quote Monitoring Plugin Readme: "The monitoring plugin adds support for chat archiving and server statistics to Openfire. It provides support for generating various reports on the server statistics, as well as managing, viewing, and reporting on chat logs."

I can see the archived messages in the monitoring GUI but I want to retrieve it in my client which I made using strophe.js library. I'm not sure how to do it. In the XEP-0136 example they created a IQ like this:

<iq type='get' xmlns='jabber:client'><retrieve xmlns='urn:xmpp:archive' with='test@localhost'>set</retrieve></iq> { nodeTree=iq, node=retrieve}

However openfire does not seem to reply. I'm not sure if I should use open archive plugin since if I check my monitoring tab the archives are already there.Moreover most of the posts concerning open archive are 2 years old so I'm not sure if it is still supported. Please advice.

Best Regards,

Stevenson Lee

Était-ce utile?

La solution 2

I was able to get it working. I basically had to setup the server and test it with a xep-0136 compliant client(vacuum im). I had some mistakes with my IQ request which cause the server-error. The proper request should be initially a list request to get the list of chat. and a retrieve request to get specific conversation details. hope it helps people who are having the same problems. vacuum has an awesome xml console that showed me what i need I suggest using it. I did have problems building it. But i was able to build and run the src i got from their svn(http://code.google.com/p/vacuum-im/source/checkout)

Autres conseils

should be like this

<iq type='get' id='juliet1'>
  <list xmlns='urn:xmpp:archive'
        with='juliet@capulet.com/chamber'>
  </list>
</iq>


<iq type='get' id='page1'>
  <retrieve xmlns='urn:xmpp:archive'
            with='juliet@capulet.com/chamber>
    <set xmlns='http://jabber.org/protocol/rsm'>
      <max>100</max>
    </set>
  </retrieve>
</iq>

or did you do something else

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top