I am developing an application in that I want to update my avatar image. I am following XEP-0153
guidelines to update my avatar image and I constructed an NSXMLElement
correspond to the following code in XEP-0153
and sent that element through XMPPStream
.
<iq from='juliet@capulet.com'
type='set'
id='vc1'>
<vCard xmlns='vcard-temp'>
<PHOTO>
<TYPE>image/jpeg</TYPE>
<BINVAL>
Base64-encoded-avatar-file-here!
</BINVAL>
</PHOTO>
</vCard>
</iq>
The server responses the following error:
<iq xmlns="jabber:client" type="error" id="vc1" to="vvreddy50@gmail.com/83557F96">
<vCard xmlns="vcard-temp">
<photo>
<type>image/jpeg</type>
<binval>Base64-encoded-avatar-file-here</binval>
</photo>
</vCard>
<error code="500" type="wait">
<internal-server-error xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">
</internal-server-error>
</error>
</iq>
Instead of <iq to='juliet@capulet.com' type='result' id='vc1'/>
Please can anyone post the code or the link related to update avatar image? Thanks in advance.
#import "XMPPvCardTemp.h"
From the XMPP Core RFC,
<error type='wait'>
means:so your code should wait a while and re-send the request.
(This is assuming that you are actually sending a base64-encoded JPEG image as the
BINVAL
of your vCard. The reply from the server doesn't correspond to the request you say you sent, so I'm assuming you've edited both. It would be better to include the exact request and reply in your question, but truncate the base64-encoded image to a few characters for concision.)