Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
AliVireTechnologies1 #1
Member since Jun 2013 · 58 posts
Group memberships: Members
Show profile · Link to this post
Subject: Getting VCard Data Error
I am using this following code for getting the data of particular user. First Thing when I call GetVcard(jid) function VCardResponse callback is call after completing all roster items,

after that when VCardResponse callback is call for each item it is giving following error.

  1. <iq type="error" id="MX_8" from="55555@192.168.101.209/Matrix-Windows-Phone" to="03234092397@192.168.101.209/Matrix-Windows-Phone" xmlns="jabber:client">
  2.  <vCard xmlns="vcard-temp" />
  3.  <error code="503" type="cancel">
  4.     <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
  5.  </error>
  6. </iq


  1. private void GetVcard(Jid jid)
  2. {
  3.     var viq = new VcardIq { To = jid, Type = Matrix.Xmpp.IqType.get };
  4.     Model.Utility.xmppClient.IqFilter.SendIq(viq, VcardResponse);
  5. }
  6.  
  7. private void VcardResponse(object sender, IqEventArgs e)
  8. {
  9.     if (e.Iq.Type == Matrix.Xmpp.IqType.result)
  10.     {
  11.         var vc = e.Iq.Query as Vcard;
  12.  
  13.         if (null != vc.Photo)
  14.         {
  15.  
  16.             try
  17.             {
  18.                 ContactPhoto = vc.Photo.Image.UriSource;
  19.             }
  20.             catch (Exception ex)
  21.             {
  22.  
  23.             }
  24.         }
  25.         else
  26.         {
  27.  
  28.             ContactPhoto = new System.Uri("/Assets/Avatar.png");
  29.         }
  30.     }
  31. }
This post was edited on 2013-06-18, 15:05 by Alex.
Avatar
AliVireTechnologies1 #2
Member since Jun 2013 · 58 posts
Group memberships: Members
Show profile · Link to this post
Em giving complete jid but it still giving an 503 error.
Avatar
Alex #3
Member since Feb 2003 · 4295 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
in your XML log there is only the server response. I need the request as well.

Alex
Avatar
AliVireTechnologies1 #4
Member since Jun 2013 · 58 posts
Group memberships: Members
Show profile · Link to this post
here it is, please tell me what is problem.

<iq id=\"MX_4\" to=\"123@vtalk.viretechnologies.com/Matrix-Windows-Phone\" type=\"get\" xmlns=\"jabber:client\">\r\n  <vCard xmlns=\"vcard-temp\" />\r\n</iq>
<presence xmlns=\"jabber:client\">\r\n  <status></status>\r\n  <priority>0</priority>\r\n</presence>
<iq type=\"error\" id=\"MX_4\" from=\"123@vtalk.viretechnologies.com/Matrix-Windows-Phone\" to=\"9203234092397@vtalk.viretechnologies.com/Matrix-Windows-Phone\" xmlns=\"jabber:client\">\r\n  <vCard xmlns=\"vcard-temp\" />\r\n  <error code=\"503\" type=\"cancel\">\r\n    <service-unavailable xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\" />\r\n  </error>\r\n</iq>

<iq type="error" id="MX_4" from="123@vtalk.viretechnologies.com/Matrix-Windows-Phone" to="9203234092397@vtalk.viretechnologies.com/Matrix-Windows-Phone" xmlns="jabber:client">
  <vCard xmlns="vcard-temp" />
  <error code="503" type="cancel">
    <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
  </error>
</iq>
Avatar
Alex #5
Member since Feb 2003 · 4295 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
the problem is that you send the query to a full Jid, you must send it to a bare Jid
Avatar
AliVireTechnologies1 #6
Member since Jun 2013 · 58 posts
Group memberships: Members
Show profile · Link to this post
now it is giving 404 error.

  1. <iq id="MX_4" to="123" type="get" xmlns="jabber:client"><vCard xmlns="vcard-temp" /></iq>
  2. <presence xmlns="jabber:client"><status></status><priority>0</priority></presence>
  3. <iq type="error" id="MX_4" to="9203234092397@vtalk.viretechnologies.com/Matrix-Windows-Phone" from="123" xmlns="jabber:client"> <vCard xmlns="vcard-temp" /><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>
  4. <iq type="error" id="MX_4" to="9203234092397@vtalk.viretechnologies.com/Matrix-Windows-Phone" from="123" xmlns="jabber:client">
  5.  <vCard xmlns="vcard-temp" />
  6.  <error code="404" type="cancel">
  7.     <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
  8.  </error>
  9. </iq>
This post was edited on 2013-06-22, 18:49 by Alex.
Avatar
Alex #7
Member since Feb 2003 · 4295 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
please read here in the tutorial about Jids to understand what a bare and full jid is.
http://www.ag-software.net/matrix-xmpp-sdk/matrix-develope…

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:
Forum: MatriX RSS