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
2. modified the component.cs file with my xmpp settings, basically only these variables changed
3. modified the component.cs file, onLogin(object sender) method with my JID
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:
I appreciate any help!
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"}]}]}
{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";
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>
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!
lzaguilar
Show profile
Link to this post
