我试图通过我自己的客户端android发布头像。我遇到了问题。但是,当我使用xabber客户端时,它可以很好地工作。
这是我试图发送的数据包:
<iq type="set">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="urn:xmpp:avatar:data">
<item id="b5ba6aeefccd49006c6a77d4a24c6bb4a87ada2c">
<data xmlns="urn:xmpp:avatar:data">...content_here_2Q==</data>
</item>
</publish>
</pubsub></iq>
以下是服务器的响应:
<iq to="mattos.official@ec2-54-200-239-11.us-west-2.compute.amazonaws.com/phone" from="mattos.official@ec2-54-200-239-11.us-west-2.compute.amazonaws.com" xmlns="jabber:client" id="vg0Q+9XmUMhh2rQxGhRjrERGdlxEjbk/1iUVlSaURM97tquqDwJpkmVxlnkF6gNhNsg" type="error" xml:lang="en">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="urn:xmpp:avatar:data" xmlns="http://jabber.org/protocol/pubsub">
<item xmlns="http://jabber.org/protocol/pubsub" id="b5ba6aeefccd49006c6a77d4a24c6bb4a87ada2c">
<data xmlns="urn:xmpp:avatar:data">content_here_2Q==</data</item>
</publish>
</pubsub>
<error xmlns="jabber:client" type="cancel" code="404">
<item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
</error>
Ejabberd版本:17.08