This post originated from an RSS feed registered with .NET Buzz
by Peter G Provost.
Original Post: Fun With WSE 2.0
Feed Title: Peter Provost's Geek Noise
Feed URL: /error.aspx?aspxerrorpath=/Rss.aspx
Feed Description: Technology news, development articles, Microsoft .NET, and other stuff...
My boss has a demo coming up where he wanted to have a little private wireless network
(not Internet connected) and he wanted to be able to send IM-like messages to all
of the machines. He wanted the little "piece of toast" popup and to be able to send
an arbitrary piece of text and a hyperlink.
Also, I've had a couple of WSE2 articles and MSDN TV downloads in my "To Be Reviewed"
folder for a while now... why not use WSE2 to build this IM thingy?
I decided to use the WSE
2.0 Messaging API, which is very easy to use. You can literally send a message
in less than 10 lines...
privatevoid sendButton_Click(object sender,
System.EventArgs e) { Uri destination = new Uri("soap.tcp://" +
machineNameTextBox.Text + ":8888/WseMessenger"); SoapSender
soapSender = new SoapSender(destination); SoapEnvelope envelope
= new SoapEnvelope(); envelope.Context.Action = "Receiver";
XmlElement body = envelope.CreateBody(); body.InnerText = messageTextBox.Text; soapSender.Send(envelope);
}
Pretty slick eh? Receiving is a little more complicated only in that you need to derive
a new class from SoapReceiver:
Easy as pie! So now the question is... when will WSE 2.0 ship?
PS. This was all moot of course. I came into the office this morning and we decided
to go with Microsoft
Office Live Communication Server instead. Since we were running on a private little
demo network anyway, why not? It was still fun to play around with the Messaging API.
PPS. If you are looking for a "piece of toast" control for C#/.NET, check out TaskbarNotifier
by John O'Byrne. It is fully skinnable and very easy to use.