Note that there are some explanatory texts on larger screens.

plurals
  1. POAdobe Flex: Unable to connect to XMPP server using XIFF library
    text
    copied!<p>I am trying to connect to my local XMPP server using the <a href="http://www.igniterealtime.org/projects/xiff/" rel="nofollow">XIFF library</a> however I am unable to do so.</p> <p>I installed <a href="http://www.process-one.net/en/ejabberd/downloads/" rel="nofollow">eJabberd</a> on my localhost and connected to it with an XMPP client (<a href="http://pandion.im/download" rel="nofollow">Pandion</a>) and this is working fine... I am able to connect to the local jabber server.</p> <p>Next, I tried connecting to the XMPP server using the following code:</p> <p>LoginView.mxml</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="Login"&gt; &lt;s:layout&gt; &lt;s:FormLayout/&gt; &lt;/s:layout&gt; &lt;fx:Declarations&gt; &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt; &lt;/fx:Declarations&gt; &lt;fx:Script source="connection/Connection.as"/&gt; &lt;s:Spacer/&gt; &lt;s:Label text="Username"/&gt; &lt;s:TextInput id="txtUsername" width="200"/&gt; &lt;s:Spacer/&gt; &lt;s:Label text="Password"/&gt; &lt;s:TextInput id="txtPassword" width="200" displayAsPassword="true"/&gt; &lt;s:Button id="btnLogin" label="Login" click="login(txtUsername.text, txtPassword.text)" mouseUp="navigator.pushView(HomeView)"/&gt; &lt;/s:View&gt; </code></pre> <p>Connection.as:</p> <pre><code>import org.igniterealtime.xiff.conference.Room; import org.igniterealtime.xiff.core.UnescapedJID; import org.igniterealtime.xiff.core.XMPPConnection; import org.igniterealtime.xiff.events.LoginEvent; private var con:XMPPConnection; private var room:Room; private function login (username:String, password:String): void { con = new XMPPConnection (); con.username = username + "@mydomain"; con.password = password; con.server = "localhost"; con.port = 5222; con.connect (0); } </code></pre> <p>However I am unable to connect to connect to the XMPP server using the ActionScript code above. Just wondering where I may be going wrong.</p> <p>Any help would be appreciated.</p> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload