Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8582995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:25:55+00:00 2026-06-11T21:25:55+00:00

I am developing a chat app for iPhone using XMPP and openfire server,OpenFire server

  • 0

I am developing a chat app for iPhone using XMPP and openfire server,OpenFire server is storing all the chat history between users but When I try to retrieve the chat history for a particular user I get only the date and the number of chat messages but not the actual text messages

I have already installed open archive plugin for message archiving on openfire

This is the stanza which I have passed to Openfire Server

    <iq type='get' id='pk1'>
    <list xmlns='urn:xmpp:archive'
    with='piyush@openfire'>
    <set xmlns='http://jabber.org/protocol/rsm'>
    <max>30</max>
    </set>
    </list>
    </iq>

This is the result which I received from server

  <iq type="result" id="pk1" to="vivek@openfire/iphone">
  <list xmlns="urn:xmpp:archive">
  <chat with="piyush@openfire" start="2012-07-04T13:16:12.291Z"/>
  <chat with="piyush@openfire" start="2012-07-05T08:25:31.555Z"/>
  <chat with="piyush@openfire" start="2012-07-05T12:38:24.098Z"/>
  <set xmlns="http://jabber.org/protocol/rsm">
  <first index="0">15</first>
  <last>25</last>
  <count>3</count>
  </set>
  </list>
  </iq>

This is the result which I want and which I expected

 <iq type='result' to='vivek@openfire/iphone' id='page1'>
 <chat xmlns='urn:xmpp:archive'
    with='piyush@openfire'
    start='2012-07-04T13:16:12.291Z'
    subject='She speaks!'
    version='4'>
<from secs='0'><body>Art thou not Romeo, and a Montague?</body></from>
<to secs='11'><body>Neither, fair saint, if either thee dislike.</body></to>
.
[98 more messages]
.
<from secs='9'><body>How cam'st thou hither, tell me, and wherefore?</body></from>
<set xmlns='http://jabber.org/protocol/rsm'>
  <first index='0'>0</first>
  <last>99</last>
  <count>217</count>
</set>

Please Help me out to get the desired result

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:25:56+00:00Added an answer on June 11, 2026 at 9:25 pm

    You have to do a request with <retrieve> (see http://xmpp.org/extensions/xep-0136.html) then you can take a specific time from the received <list> result. For example:

    Send:

        <iq type='get' id='pk1'>
           <list xmlns='urn:xmpp:archive'
                   with='piyush@openfire'>
            <set xmlns='http://jabber.org/protocol/rsm'>
                <max>30</max>
            </set>
          </list>
       </iq>
    

    Receive:

     <iq type="result" id="pk1" to="vivek@openfire/iphone">
         <list xmlns="urn:xmpp:archive">
          <chat with="piyush@openfire" start="2012-07-04T13:16:12.291Z"/>
          <chat with="piyush@openfire" start="2012-07-05T08:25:31.555Z"/>
          <chat with="piyush@openfire" start="2012-07-05T12:38:24.098Z"/>
          <set xmlns="http://jabber.org/protocol/rsm">
              <first index="0">15</first>
               <last>25</last>
               <count>3</count>
          </set>
        </list>
     </iq>            
    

    Now you choose one of starts and send (date and hour must be exacts):

      <iq type='get' id='pk1'>
        <retrieve xmlns='urn:xmpp:archive'
            with='piyush@openfire''
            start='2012-07-04T13:16:12.291Z'>
         <set xmlns='http://jabber.org/protocol/rsm'>
           <max>100</max>
         </set>
        </retrieve>
     </iq>
    

    You will receive something like this (depends the max value -> max=30, bodies=30):

       <iq type='result' to='vivek@openfire/iphone' id='page1'>
          <chat xmlns='urn:xmpp:archive'
                 with='piyush@openfire'
                  start='2012-07-04T13:16:12.291Z'
                subject='She speaks!'
           version='4'>
             <from secs='0'><body>Art thou not Romeo, and a Montague?</body></from>
             <to secs='11'><body>Neither, fair saint, if either thee dislike.</body></to>
              .
              [28 more messages]
              .
             <from secs='9'><body>How cam'st thou hither, tell me, and therefore?           </body>   
             </from>
          <set xmlns='http://jabber.org/protocol/rsm'>
           <first index='0'>0</first>
           <last>29</last>
           <count></count>
         </set>
      <iq>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im developoing an app for the iPhone where users can chat using their facebook
(I am developing an app that presents chat messages in a table. But, this
I'm developing a small chat application between client and server. I would like to
I am developing Android Application for Chat between two users as private session .
I'm developing a chat app, but I have a problem. I've a list with
I am developing a chat application for Android, using AIR/Flex and Red5. But Acoustic
I want to try Meteor so I stated developing a small multi-rooms chat app
I am interested in developing a chat engine using XMPP and I want to
Good Day to all. I am currently developing a chat application using cakePHP. It
Im currently developing a chat client for the iphone. Server-side there is a node.js

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.