unable to parse or receive custom IQ set

351 views
Skip to first unread message

Jay T

unread,
Mar 10, 2012, 12:00:01 PM3/10/12
to XMPPFramework
I am near completion of my iOS app, but I need some help with parsing
a custom IQ set.

I am using openfire for my xmpp server and XMPPFramework for iOS
client. My app is able to parse message received but not IQ received.
The IQ request does not seem to be triggered in (- (BOOL)xmppStream:
(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq). The IQ seems to just
gets dropped. Am I supposed to register a special IQ listener or IQ
provider in my iOS app or openfire server? I am really lost and would
really appreciate if someone can provide some suggestions.

I currently have my xmlns set as "jabber:client". The IQ gets ignored
and not parsed / received. However, If i use a random namespace I will
receive an error 503 stanza response.

A sample of my IQ request looks like
NSXMLElement *iq = [NSXMLElement elementWithName:@"iq"];
[iq addAttributeWithName:@"type" stringValue:@"set"];
[iq addAttributeWithName:@"to" stringValue:@"test@..."];
[iq addAttributeWithName:@"id" stringValue:@"setRandomProfile"];

NSXMLElement *query = [NSXMLElement elementWithName:@"query"
xmlns:@"jabber:client"];
NSXMLElement *profile = [NSXMLElement elementWithName:@"profile"];
[query addChild:profile];
[profile addChild:[NSXMLElement elementWithName:@"username"
stringValue:username]];
[profile addChild:[NSXMLElement elementWithName:@"name"
stringValue:@"John Doe"]];
[iq addChild:query];


Here is a scenario of what works and what does not:

Working
iOS client A -- ( IQ Set Request ) --> Openfire server
reply: iOS client A <-- (IQ Result) -- Openfire Server

Not working:
iOS client A -- ( Send IQ Set Request ) --> Openfire server
reply: iOS client B <-- (Send IQ Set) -- Openfire Server (Not working,
client B does not receive an IQ Request)
(- (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq was
not triggered)

iOS client A -- ( IQ Set Request ) --> iOS client A (Not working,
client A does not receive IQ)
OR
iOS client A -- ( IQ Set Request ) --> iOS client B (Not working,
client B does not receive IQ)
Xcode debugger indicated Client A sent IQ Request, but neither client
A or B received an IQ Request.

徐冰

unread,
Jul 5, 2018, 8:55:50 AM7/5/18
to XMPPFramework
Do you resolve this problem ? Can you tell me what do you do to resolve the problem.Thank you

在 2012年3月11日星期日 UTC+8上午1:00:01,Jay T写道:

徐冰

unread,
Jul 5, 2018, 10:29:06 PM7/5/18
to XMPPFramework
Thank you for your reply. Can you give me detail reason for that problem?For example,github issue


--
You received this message because you are subscribed to the Google Groups "XMPPFramework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmppframewor...@googlegroups.com.
To post to this group, send email to xmppfr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xmppframework/babe0637-9ec9-4c71-b856-364d6f871d8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages