title: Create message while sending Image through Asmack
body: <p>There is an issue that I am facing while sending Images through XMPP.Below is the code snippet that i have done. I don't know what is wrong with the code .</p>
  
  <pre><code>Message msg = new Message(emailId, Message.Type.chat);
              ImageTransferExtension transfer = new ImageTransferExtension();
              transfer.setImageName(mImageUri.getEncodedPath());
              transfer.setUserRecipient(emailId);
              msg.addExtension(transfer);
  </code></pre>
  
  <p>And here is the ImagesTransferExtension code snippet</p>
  
  <p>EDIT :</p>
  
  <pre><code>public class ImageTransferExtension implements PacketExtension {
  
  private String userRecipient;
  private String ftpUrl;
  private String httpUrl;
  private String id;
  private String typeOfMessage;
  private String fieldName;
  private String duration;
  
  @Override
  public String getElementName() {
      // TODO Auto-generated method stub
      return "x";
  }
  
  @Override
  public String getNamespace() {
      // TODO Auto-generated method stub
      return "jabber:client";
  }
  
  @Override
  public String toXML() {
      StringBuilder builder = new StringBuilder();
      builder.append("&lt;" + getElementName() + " xmlns=\"" + getNamespace()
              + "\"&gt;");
      if (ftpUrl != null) {
          builder.append("&lt;ftpUrl&gt;").append(ftpUrl).append("&lt;/ftpUrl&gt;");
      }
      if (httpUrl != null) {
          builder.append("&lt;httpUrl&gt;").append(httpUrl).append("&lt;/httpUrl&gt;");
      }
      if (typeOfMessage != null) {
          builder.append("&lt;typeOfMessage&gt;").append(typeOfMessage)
                  .append("&lt;/typeOfMessage&gt;");
      }
      if (fieldName != null) {
          builder.append("&lt;fieldName&gt;").append(fieldName)
                  .append("&lt;/fieldName&gt;");
      }
      if (duration != null) {
          builder.append("&lt;duration&gt;").append(duration).append("&lt;/duration&gt;");
      }
      builder.append("&lt;/" + getElementName() + "&gt;");
  
      return builder.toString();
  }
  
  public String getUserRecipient() {
      return userRecipient;
  }
  
  public void setUserRecipient(String userRecipient) {
      this.userRecipient = userRecipient;
  }
  
  public String getId() {
      return id;
  }
  
  public void setId(String id) {
      this.id = id;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I don't know what to pass in the Namespace and the Element. I went through the document but found no solution.</p>