Hi all,
i'm creating an 'iq' stanza with Strophe.js to be sent to the Collecta
XMPPAPI.
everything works fine, until the script sends the stanza over. i get
the following error:
<body rid='607495811' xmlns='http://jabber.org/protocol/httpbind'
sid='ab59c6e0621fc14f261c13ce501feb9f2d935c0d' type='terminate'>
<presence xmlns='jabber:client' type='unavailable'/>
</body>
looking at my stanza (created by Strophe $ip()), it inserts,
automatically, "xmlns='jabber:client'" into my IQ tag.
<iq type='set' from='to...@collecta.com/search'
to='search.collecta.com' id='notify1' xmlns='jabber:client'>
my question is.. how do i get rid of that bit at the end??
(xmlns='jabber.client')
any ideas?
Try leaving the from attribute empty, I think the server should add the jid that is associated with your current connection.
Also do please note that a jid whilst being the same format as an email address it is NOT an actual email address usually, it is just a registered account on an xmpp domain.
Cheers
Kirk
On 23 Jul 2010, at 05:32, Shaun <sh...@creation.st> wrote:
>
i just tried that (leaving jid blank), but the same error appears.
(Remote-Stream-Error)
i read on the API key request page, that you needed to specify which
API you're going to use.
perhaps this is the problem - my API key is not allowed to access the
XMPP API? anyway, i've written to request a new key, and i've
specified that i want to use the XMPP API. hope this solves it.
Hey Shaun,i just tried that (leaving jid blank), but the same error appears.
(Remote-Stream-Error)You cant have a blank from attribute either. You need to either set it to jid that you are logged in as, or not include the attribute all together, then it should work.
I apologize for the confusion. Stanzas are normally given in examples
with the from so that it's clear who is sending the stanza.
Just remember that you never need to specify the from yourself in the
client case. The server will always stamp the from with your full JID.
Some servers will ignore what you put, but others will reject any
attempt to "forge" a stanza.
I'm glad you've got it working.
jack.