I have been trying to connect to my jabber server using Net::Jabber and getting an error. I started to look at the code but since I guess other people having been using it successfully I must be doing something wrong. The code is very simple, so its difficult to see what I am doing wrong! The server is from Exodus.

 my $connection = Net::Jabber::Client->new( debugLevel => $self->{jlog}, );
if (
      $connection->Connect(
                            hostname => $self->{server},
                            port     => $self->{port},
                            tls      => 1,
      )
   )
 {
   $self->{connection} = $connection;
 } else
 {
   $self->setError( $connection->GetErrorCode() );

   # Still seems to be connected sometimes!
   $connection->Disconnect();
 }

and what gets printed out with debugLevel = 1


XML::Stream: new: hostname = (ch-gva-pc57.jabcap.tld)
XML::Stream: SetCallBacks: tag(node) func(CODE(0x204d590))
XMPP::Conn: SetCallBacks: tag(message) func(CODE(0x204d7dc))
XMPP::Conn: SetCallBacks: tag(presence) func(CODE(0x204d878))
XMPP::Conn: SetCallBacks: tag(iq) func(CODE(0x204d938))
XMPP::Conn: SetDirectXPathCallBacks: xpath(/[EMAIL PROTECTED]"urn:ietf:params:xml:ns:xmpp
-tls"]) func(CODE(0x2762894))
XMPP::Conn: SetDirectXPathCallBacks: xpath(/[EMAIL PROTECTED]"urn:ietf:params:xml:ns:xmpp
-sasl"]) func(CODE(0x27629d8))
XMPP::Conn: Connect: host(jabretalk:5222) namespace(jabber:client)
XMPP::Conn: Connect: timeout(10)
XML::Stream: Connect: type(tcpip)
XML::Stream: Connect: Got a connection
XML::Stream: Send: (<?xml version='1.0'?><stream:stream version='1.0' xmlns:stre am='http://etherx.jabber.org/streams' xmlns='jabber:client' to='jabretalk' from=
'ch-gva-pc57.jabcap.tld' xml:lang='en' >)
XML::Stream: Read: buff(<?xml version='1.0' encoding='UTF-8'?><stream:stream xml ns:stream="http://etherx.jabber.org/streams"; xmlns="jabber:client" from="jabreta
lk" id="3e15b6bd" xml:lang="en" version="1.0">)
XML::Stream: Read: buff(<stream:features><starttls xmlns="urn:ietf:params:xml:ns :xmpp-tls"><required/></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-
sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>CR
AM-MD5</mechanism></mechanisms></stream:features>)
XMPP::Conn: Connect: connection made
XML::Stream: SetCallBacks: tag(node) func(CODE(0x2762b34))
XML::Stream: Send: (<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>)
XML::Stream: Read: buff(<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>)
XML::Stream: TLSClientProceed: Convert normal socket to SSL
XML::Stream: TLSClientProceed: sock(IO::Socket::INET=GLOB(0x2762c60))
XML::Stream: LoadSSL: Load the IO::Socket::SSL module
XML::Stream: LoadSSL: Success
XML::Stream: TLSClientProceed: ssl_sock(IO::Socket::SSL=GLOB(0x2762c60))
XML::Stream: TLSClientProceed: SSL: We are secure
XML::Stream: Send: (<?xml version='1.0'?><stream:stream version='1.0' xmlns:stre am='http://etherx.jabber.org/streams' xmlns='jabber:client' to='jabretalk' from=
'ch-gva-pc57.jabcap.tld' xml:lang='en' >)
XML::Stream: Read: buff(<?xml version='1.0' encoding='UTF-8'?><stream:stream xml ns:stream="http://etherx.jabber.org/streams"; xmlns="jabber:client" from="jabreta lk" id="3e15b6bd" xml:lang="en" version="1.0"><stream:features><mechanisms xmlns
="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>
PLAIN</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns= "http://jabber.org/features/compress";><method>zlib</method></compression><auth x
mlns="http://jabber.org/features/iq-auth"/></stream:features>)
Can't use an undefined value as a HASH reference at C:/Perl/site/lib/XML/Stream.
pm line 1167.

Reply via email to