Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
aaron #1
Member since Oct 2006 · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: about agsXMPP SDK 's small sample
hello ~ Alex and Jabberer

XmppClientConnection xmpp = new XmppClientConnection("jabber.org");
xmpp.Open("myUsername", "mySecret");
// Wait for the OnLogin event and send your message
xmpp.Send( new Message("test@jabber.org", MessageType.chat, "Hello, how are you?"));


I copy these code to VS2005;  but there was a error in this line <<xmpp.Send( new Message("test@jabber.org", MessageType.chat, "Hello, how are you?")); >>

the error's info is <<System.NullReferenceException>>

thanks~~
Avatar
aaron #2
Member since Oct 2006 · 4 posts
Group memberships: Members
Show profile · Link to this post
using agsXMPP;
using agsXMPP.Xml;
using agsXMPP.Xml.Dom;
using agsXMPP.protocol.client;
Avatar
aaron #3
Member since Oct 2006 · 4 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #1
the error's info is <<System.NullReferenceException:Not setting targets to quote examples of targets >>
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello aaron,

please post your Debug XML here.
And take a look at the MiniClient sample. Does this sample work for you?

Alex
Avatar
aaron #5
Member since Oct 2006 · 4 posts
Group memberships: Members
Show profile · Link to this post
thank you ~ Alex ..

the MiniClient sample is no problem ....

the Debug XML is chinese .. I don't know how to let you understand....

by the way ..  I use the agsXMPP to develop a web client ...

???????????????
??: ???? Web ??????????????????????????????????????????????????

??????: System.NullReferenceException: ???????????????

???:


? 29:         XmppClientConnection xmpp = new XmppClientConnection("192.168.1.9");
? 30:         xmpp.Open("aaron@aaron", "1");
? 31:         xmpp.Send(new Message("test@aaron", MessageType.chat, "Hello, how are you?"));
? 32:     }
? 33: }
 

???: f:\test\test2\Default.aspx.cs    ?: 31

????:


[NullReferenceException: ???????????????]
   agsXMPP.net.ClientSocket.Send(Byte[] bData) +127
   agsXMPP.net.ClientSocket.Send(String data) +96
   agsXMPP.XmppConnection.Send(String xml) +28
   agsXMPP.XmppConnection.Send(Element e) +19
   _Default.Button1_Click(Object sender, EventArgs e) in f:\test\test2\Default.aspx.cs:31
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Avatar
Jabberer #6
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
We need the XML Debug. Look at the events OnReadXml and OnWriteXml and write them to a TextBox or the Console Window.
Software Developer
AG-Software
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