大佬教程收集整理的这篇文章主要介绍了ios – XMPPFramework – 从Openfire Server检索归档的消息,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我已经在openfire上安装了用于邮件归档的打开的归档插件
这是我传递给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>
这是我从服务器收到的结果
<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>
这是我想要的结果,我预期的结果
<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>
请帮我取得理想的结果
谢谢
发送:
<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>
接收:
<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>
现在您选择启动和发送之一(日期和时间必须是精确的):
<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>
你会收到这样的东西(取决于最大值 – > 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,if either thee dislike.</body></to> . [28 more messages] . <from secs='9'><body>How cam'st thou hither,and therefore? </body> </from> <set xmlns='http://jabber.org/protocol/rsm'> <first index='0'>0</first> <last>29</last> <count></count> </set> <iq>
以上是大佬教程为你收集整理的ios – XMPPFramework – 从Openfire Server检索归档的消息全部内容,希望文章能够帮你解决ios – XMPPFramework – 从Openfire Server检索归档的消息所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。