xmppframework - send custom xmpp IQ in ios -
i want send following iq open fire server:
<iq type="get"> <regdata xmlns="abc"> <username>cooper</username> <emailid>cooper@hotmail.com</emailid> <password>cooperpass</password> <dob>11-12-1979</dob> <gender>male</gender> </regdata> </iq>
what shall command in xcode?
i'm using below mentioned script not working.
nsxmlelement *regdata = [nsxmlelement elementwithname:@"regdata" xmlns:@"abc"]; nsxmlelement *iq = [nsxmlelement elementwithname:@"iq"]; xmppjid *myjid = self.xmppstream.myjid; [iq addattributewithname:@"type" stringvalue:@"get"]; [iq addattributewithname:@"from" stringvalue:myjid.description]; [iq addattributewithname:@"to" stringvalue:myjid.domain]; [iq addattributewithname:@"username" stringvalue:txtname.text]; [iq addattributewithname:@"emailid" stringvalue:txtemail.text]; [iq addattributewithname:@"password" stringvalue:txtpassword.text]; [iq addattributewithname:@"dob" stringvalue:txtdob.text]; [iq addattributewithname:@"gender" stringvalue:txtgender.text]; [iq addchild:regdata]; [self.xmppstream sendelement:iq];
Comments
Post a Comment