swift - iOS Error 404 Remote Server not found error while sending message -


first of may can duplicate question, due curiosity asked.

i working on xmpp project openfire in swift language. after few searchings successful register user. when want send message user throws me error 404, remote server not found. don't know why happening.

here code send message:

let sendtouser = strusername + "@" + kappdelegate.strjdomain         let body = xmlelement.element(withname: "body") as! xmlelement         body.stringvalue = tv_message.text!          let thread = xmlelement.element(withname: "thread", stringvalue: "messagethread")  as! xmlelement          let messagebody = xmlelement.element(withname: "message") as! xmlelement         messagebody.addattribute(withname: "type", stringvalue: "chat")         messagebody.addattribute(withname: "to", stringvalue: sendtouser)         messagebody.addchild(body)         messagebody.addchild(thread)         messagebody.addattribute(withname: "id", stringvalue: (kappdelegate.xmppstream?.generateuuid())!)          kappdelegate.xmppstream?.send(messagebody) 

when click on send throws me error:

send: <message type="chat" to="akhilesh@198.38.88.254"><body>hello</body><thread id="3087b0e8-f926-426b-9b8f-15473f4404f2">messagethread</thread></message>   recv: <message xmlns="jabber:client" to="gourav@vps.parkhya.org/411dv3ejcj" from="akhilesh@198.38.88.254" type="error"><thread>messagethread</thread><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message> 

i using port no.: 5222

when login open fire correctly showing me user online status , when tried send message not works. used few references no result. apart these have setup open fire settings required plugins activated.

first of all, sending 2 different domain names sender , receiver. need check 1 correct , set it.

the correct 1 shown on openfire default home page i.e in server info. can make corrections there. after not these errors.


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -