title: XMPPFramework - How can I update my own avatar image?
body: <p>I am developing an application in that I want to update my avatar image. I am following <code>XEP-0153</code> guidelines to update my avatar image and I constructed an <code>NSXMLElement</code> correspond to the following code in <code>XEP-0153</code> and sent that element through <code>XMPPStream</code>. </p>
  
  <pre><code>&lt;iq from='juliet@capulet.com' 
      type='set'
      id='vc1'&gt;
    &lt;vCard xmlns='vcard-temp'&gt;
      &lt;PHOTO&gt;
        &lt;TYPE&gt;image/jpeg&lt;/TYPE&gt;
        &lt;BINVAL&gt;
          Base64-encoded-avatar-file-here!
        &lt;/BINVAL&gt;
      &lt;/PHOTO&gt;
    &lt;/vCard&gt;
  &lt;/iq&gt;
  </code></pre>
  
  <p>The server responses the following error:</p>
  
  <pre><code>&lt;iq xmlns="jabber:client" type="error" id="vc1" to="vvreddy50@gmail.com/83557F96"&gt;
  &lt;vCard xmlns="vcard-temp"&gt;
        &lt;photo&gt;
          &lt;type&gt;image/jpeg&lt;/type&gt;
          &lt;binval&gt;Base64-encoded-avatar-file-here&lt;/binval&gt;
        &lt;/photo&gt;
  &lt;/vCard&gt;
  &lt;error code="500" type="wait"&gt;
        &lt;internal-server-error xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"&gt;
        &lt;/internal-server-error&gt;
  &lt;/error&gt;
  &lt;/iq&gt;
  </code></pre>
  
  <p>Instead of  <code>&lt;iq to='juliet@capulet.com' type='result' id='vc1'/&gt;</code></p>
  
  <p>Please can anyone post the code or the link related to update avatar image? Thanks in advance.</p>