Not logged in. · Lost password · Register
Forum: agsXMPP RSS
I am unable to get the photo from an openfire vcard
Page: previous  1  2  3  next
Avatar
Alex #16
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post ID 3455
Quote by rheuser:
I understand how to get the tooltip box to popup showing the object values, but when I try to take a screen shot by press alt-shift-PrtScn the tooltip disappears and is not in the screen shot.  How do you take the screen shot with the tooltip information showing?

PrintScreen without alt-shift prints the complete screen without stealing focus and closing the focus. After this I cut the screen in my preferred graphics program Paint .NET.

Alex
Avatar
Alex #17
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post ID 3458
Quote by rheuser:
I would be happy to get you access to our OpenFire server since it is a development machine if that would help you.  Then you could debug it on your own machine.

yes this sounds good.
Before we do this can you please test if the same happens with the MiniClient example which ships with the SDK? To see if its a Compact Framework or general problem.
The MiniClint has some vcard code already, So you should be able to cause the problem without changing the code.

Alex
Avatar
rheuser #18
Member since Aug 2008 · 25 posts · Location: Fremont, Ca, USA
Group memberships: Members
Show profile · Link to this post
I was unable to get the MiniClient to connect to our Openfire server.  We are using a self signed certificate and I think that your socket support was unhappy about it.  In any event, I received a message stating that there was a socket error trying to connect and that the connection was refused.  Yet, I can connect with my code and I can connect using Psi.  I just have to accept the self signed certificate.

Anyway to connect, here is my connection code;
        Jid jidUser = new Jid("alex@localhost");
        xmppCon.Resource = "OpenFireWindowsMobileClient";
        xmppCon.Priority = 10;
        xmppCon.UseCompression = false;
        xmppCon.Port = 5222;
        xmppCon.Username = jidUser.User;
        xmppCon.Server = jidUser.Server;
        xmppCon.ConnectServer = "donniepinkston.net";
        xmppCon.Password = "abc1234";
        xmppCon.AutoResolveConnectServer = true;
        xmppCon.Open();

and here is my code for getting the Vcard that has a null Photo
    public void GetPhoto(Jid jid, XmppClientConnection xmppCon, string PhotoHash)
    {
      VcardIq viq = new VcardIq(IqType.get, new Jid(jid.Bare));
      packetId = viq.Id;
      xmppCon.IqGrabber.SendIq(viq, new IqCB(VcardResult), null);
    }

    private void VcardResult(object sender, IQ iq, object data)
    {
      if (iq.Type == IqType.result)
      {
        Vcard vcard = iq.Vcard;
        if (vcard != null)
        {
          string fullname = vcard.Fullname;
          string nickname = vcard.Nickname;
          string description = vcard.Description;
          Photo photo = vcard.Photo;
          if (photo != null)
          {
            OnPhotoReceived(sender, iq.From, photo);
          }
        }
      }
    }

The account is set up to use the Gtalk Gateway and has four Contacts.  Each contact has a photo that will be included in the presence.  The problem recreates for me without a problem.

Good luck and let me know how you do.

Regards,
Dick Heuser
Avatar
rheuser #19
Member since Aug 2008 · 25 posts · Location: Fremont, Ca, USA
Group memberships: Members
Show profile · Link to this post
Alex,

By the way, if I connect directly to Gtalk instead of through the openfire server, this code on this Gtalk account works OK.

Dick Heuser
Avatar
Alex #20
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi Dick,

thank you for creating a test account.
To connect to your server with the MiniClient you have to use AutoResolveConnectServer = false. Otherwise it ignores your connect server and resolves it from the DNS and SRV Records.

I can cause the problem. The problem is that in the Vcard everywhere CDATA is used. CDATA is not defined in the XMPP core, and if I read the core correctly its prohibited.

I see CDATA also in other places. Here are 2 stanzas from the traffic:

  1. <presence to="alex@localhost" from="madolyn.heuser\40gmail.com@gtalk.localhost"><show>away</show><x xmlns="vcard-temp:x:update"><photo><![CDATA[719e51cdbd7a436f03d70197cc13232be8ea48ac]]></photo><hash><![CDATA[719e51cdbd7a436f03d70197cc13232be8ea48ac]]></hash></x></presence>
  2.  
  3. <iq type="result" id="agsXMPP_14" from="donnie.pinkston\40gmail.com@gtalk.localhost" to="alex@localhost/MiniClient">
  4.     <vCard xmlns="vcard-temp">
  5.         <VERSION><![CDATA[2.0]]></VERSION>
  6.         <JABBERID><![CDATA[donnie.pinkston\40gmail.com@gtalk.localhost]]></JABBERID>
  7.         <NICKNAME><![CDATA[Donnie Pinkston]]></NICKNAME>
  8.         <PHOTO xmlns=""><TYPE><![CDATA[image/jpeg]]></TYPE><BINVAL><![CDATA[XXX_CUT_XXX]]></BINVAL></PHOTO>
  9.     </vCard>
  10. </iq>

CDATA is not fully implemented in agsXMPP because its prohibited and I have not seen any clients using it before.

What I don't understand is:
Your server seems not to be on the federated XMPP network. But its rewriting GTalk Jids to local jids and is exchanging presence, message and other stanzas with GTalk. Is there a special XMPP<-->XMPP Gateway running on your machine? If yes then probably the CDATA gets generated by this Gateway and the Gateway needs a small bugfix.

Can you elaborate on this?

Thanks,
Alex
Avatar
rheuser #21
Member since Aug 2008 · 25 posts · Location: Fremont, Ca, USA
Group memberships: Members
Show profile · Link to this post
Subject: Cdata
Alex,

Thank you for the investigation.  I will contact the guy that is caring for the Openfire server and get back to you.

Regards,
Dick
Avatar
rheuser #22
Member since Aug 2008 · 25 posts · Location: Fremont, Ca, USA
Group memberships: Members
Show profile · Link to this post
In reply to post #20
Subject: OpenFire and CDATA
Alex,

Yes, the OpenFire XMPP server is using a Gateways to talk to the individual IMs.  The whole idea of our service is to consolidate several IMs and several Social Networks together for our users.

The guy who manages the server is updating to a new version.  It is possible that will eliminate the CDATA issue.  Do you plan to support CDATA blocks in the Vcard?  If not, then I will have to deal with them myself.

Dick
Avatar
Alex #23
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Because CDATA is not allowed in XMPP I am not keen to add it to agsXMPP. But we had 1 request for CDATA several month ago.
Is this a standard Openfire component which you are running, or is this a custom addon created by your company?
If it is code from JiveSoftware I will contact the developers at Jive.

Alex
Avatar
rheuser #24
Member since Aug 2008 · 25 posts · Location: Fremont, Ca, USA
Group memberships: Members
Show profile · Link to this post
In reply to post #22
Subject: new credentials
Alex,

We now have the new version of OpenFire and its standard Gateways running.  The problem with CDATA in the XML remains, so, I am still not getting photos extracted from Vcards.  The gateways are not modified by us.  In order to eliminate the CDATA we would have to modify them.  In case you need further access your new credentials are

username: fidgtuser61@localhost
password: password61

I have given you accounts that use both the Gtalk gateway and the AIM gateway.

By the way, when I use Psi to access the OpenFire server, it displays the photos OK.

regards,
Dick Heuser
Avatar
rheuser #25
Member since Aug 2008 · 25 posts · Location: Fremont, Ca, USA
Group memberships: Members
Show profile · Link to this post
Subject: Jive Software
Alex,

According to the guy who implemented the server:

Nothing has been modified at all.  The gateway implementations are from Jive Software.

http://www.igniterealtime.org/community/docs/DOC-1005

Dick
Avatar
Alex #26
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Subject: CDATA bug
OK, I will contact the developer once I see him online again or file a bug in their bugtracker.

Alex
Avatar
Alex #27
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi Dick,

I have done more testing. Here are my results.

I added parsing of CDATA a while ago to agsXMPP, only creating and writing CData nodes is not fully implemented, so CDATA is not the problem here. Its reading all the CDATA nodes correct.
I studied the XML again and found a bug in the Vcard:

  1. <iq type="result" id="jcl_18" from="kernel1983\40gmail.com@gtalk.localhost" to="fidgtuser61@localhost/ALEX-LAPTOP">
  2. <vCard xmlns="vcard-temp">
  3.     <VERSION><![CDATA[2.0]]></VERSION>
  4.     <JABBERID><![CDATA[kernel1983\40gmail.com@gtalk.localhost]]></JABBERID>
  5.     <NICKNAME><![CDATA[KJ]]></NICKNAME>
  6.     <PHOTO xmlns="">
  7.         <TYPE><![CDATA[image/jpeg]]></TYPE>
  8.         <BINVAL><![CDATA[...]]></BINVAL>
  9.     </PHOTO>
  10. </vCard>
  11. </iq>

The server is sending an empty namespace for the photo tag. This is why agsXMPP does not create the photo class which MUST be in the vcard-temp namespace. I contacted the Openfire author and I'm waiting for a reply.
My assumption is that they will fix it, otherwise I can propose you an easy patch for your project, but this patch will not make it to the official agsXMPP code because its a server or gateway bug.

Regards,
Alex
Avatar
rheuser #28
Member since Aug 2008 · 25 posts · Location: Fremont, Ca, USA
Group memberships: Members
Show profile · Link to this post
Subject: Fix or bypass for empty namespace tag
Alex,

Thank you for continuing to pursue this issue.  I am anxious to resolve the issue so that I start getting photos again in my roster. Please let me know which way you want to go.

Thank you again,
Dick Heuser
Avatar
Alex #29
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Subject: fix for vCard bug
you can add another entry in the Factory for the wrong namespace:

  1. AddElementType("PHOTO", Uri.VCARD,   typeof(agsXMPP.protocol.iq.vcard.Photo));
  2. AddElementType("PHOTO""",        typeof(agsXMPP.protocol.iq.vcard.Photo));
Avatar
Alex #30
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
FYI,
http://www.igniterealtime.org/issues/browse/GATE-435

should be fixed soon in openfire.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page: previous  1  2  3  next
Forum: agsXMPP RSS