Not logged in. · Lost password · Register
Forum: agsXMPP RSS
<error type="modify" code="400"><bad-request
Avatar
lzaguilar #1
Member since Aug 2011 · 2 posts · Location: Jacksonville, FL USA
Group memberships: Members
Show profile · Link to this post
Subject: Component Example included in the SDK
Hello,

New to xmpp but I've been reading XMPP definative guide and feel I have a decent understanding.  But alas I'm struggling with trying to get the included server component example working with ejabberd server.  I only made the following changes:

1. added an ejabberd_service entry under listen to the ejabberd config file, like shown
        {5275, ejabberd_service, [
              {host, "RFT.flqaadmin01.corp.fnfs.net",
              [{password, "RFT"}]}]}

2. modified the component.cs file with my xmpp settings, basically only these variables changed
            private const int PORT = 5275;
            private const string SECRET = "RFT";
            private const string HOST = "flqaadmin01.corp.fnfs.net";
            private const string JID = "RFT.flqaadmin01.corp.fnfs.net";

3. modified the component.cs file, onLogin(object sender) method with my JID
    msg.To = new Jid("laguilar@flqaadmin01.corp.fnfs.net");

4.  Rebuilt solution and restarted ejabberd service.

When I run the component exe, it yields an error when sending the message from within the onLogin handler.  Below is the output from the console:

OnWriteXml: <stream:stream to='RFT.flqaadmin01.corp.fnfs.net' xmlns='jabber:comp
onent:accept' xmlns:stream='http://etherx.jabber.org/streams'>

OnReadXml: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" id="25
13564336" from="RFT.flqaadmin01.corp.fnfs.net" >

OnWriteXml: <handshake>2dd8d7723a174b82e9e65ad546e823a71060dc4c</handshake>

OnReadXml: <handshake xmlns="jabber:component:accept" />

OnLogin

OnWriteXml: <message type="chat" to="laguilar@flqaadmin01.corp.fnfs.net" from="R
FT.flqaadmin01.corp.fnfs.net"><body>Hello from your component</body></message>

OnReadXml: <message xmlns="jabber:component:accept" to="RFT.flqaadmin01.corp.fnf
s.net" type="error" from="laguilar@flqaadmin01.corp.fnfs.net"><body>Hello from y
our component</body><error type="modify" code="400"><bad-request xmlns="urn:ietf
:params:xml:ns:xmpp-stanzas" /></error></message>

OnMessage
<message xmlns="jabber:component:accept" to="RFT.flqaadmin01.corp.fnfs.net" type
="error" from="laguilar@flqaadmin01.corp.fnfs.net"><body>Hello from your compone
nt</body><error type="modify" code="400"><bad-request xmlns="urn:ietf:params:xml
:ns:xmpp-stanzas" /></error></message>

I appreciate any help!
Avatar
lzaguilar #2
Member since Aug 2011 · 2 posts · Location: Jacksonville, FL USA
Group memberships: Members
Show profile · Link to this post
Subject: case sensitive
I figured it out, natually just after I posted :)

Changed JID value to all lowercase, updated config file, and rebuilt.  No more errors, YEA!!
private const string JID = "rft.flqaadmin01.corp.fnfs.net";
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: agsXMPP RSS