Welcome to CrankyGoblin.Com Sign in | Join | Help

Public Class GeoffAppleby

Inherits Microsoft.VisualBasic.MVP : Implements IBrainFart
WSE3 CTP

It's already been said a few places, but the WSE3 CTP appeared for download in the last couple of days from the MSDN website.

This wouldn't normally worry me, since I'm yet to actually find a use for any WSE stuff myself. I'm ot saying it's not useful, I'm only saying that so far I've had no need of it.

But this time when I read about it coming out, my pricked up a little, and I had to do some further investigations. There two things especially that I noticed (copied from the link above - the release notes):

1) ASP.NET Web services, otherwise known as ASMX Web services, can now be hosted outside of IIS, for example in console applications or NT services and called with the TCP/IP protocol. The existing lightweight, message-oriented, SOAP programming model SoapSender/ SoapReceiver classes remain.

2) Support for the W3C MTOM Recommendation to enable large amounts of binary data to be sent efficiently and securely.

Support for MTOM...yeah, whatever, sounds interesting, but I hadn't heard of it. In the last few hours I've since found out, and I think I can make some very good use of this. It actually works quite easily - enable a WSE3 feature, and all of a sudden your binary data gets sent as actual binary data. Yay! For those that don't know, without this support all binary data gets base64 encoded, which bloats out the amount of network traffic on a ratio of 3:4 (your data gets made a third bigger).

But the one I particularly is the ability to host a web service within any application, not just a web application.

Think about it.  Got two applications that need to talk to each other? How do you do it? Back in the dark ages, I would have written my own custom tcp/ip protocol to send messages between them, and have my own socket code binding to listen ports and stuff. Slightly less time ago, I would have done the same thing, but used the winsock control on my VB6 apps. There's also things like MSMQ, but that's not _direct_ communication. Since .net, I've almost never needed to do it. Web and Web Services are just too powerful to do it almost any other way (and if you need to do it another way, there's remoting).

But now who needs remoting?

I can think of at least two different applications at work that have been written where there's a windows service that polls a database looking for work to be done, and they each have a separate webservice as an entry point to give it work to do - and all the web services do is write data to the database so that the windows service can poll it and pick it up and some point later in time.

So no we have a windows service that instead of entering an infinite loop that checks for work and then sleeps for a while, it spawns off one of these inline webservices and just waits for people to hit it.

And now we're in a stateful environment, instead of a stateless web app, so we _can_ in the webmethod call spawn off a new thread to deal with the request, and, say, exit the web method immediately (in the cases where it's a request for work to be done, and not data to be sent back). How cool is that?

I'm excited.

Oh, and just to prove to myself that it really is that easy, I've already done it. The only trick I had was that once a web reference had been made (yeah, I cheated) you have to remember to instantiate the 'WebReferenceObjectWSE' class, not the 'WebReferenceObject' class.

And all it took was a very small amount of code.

This is the server (a winforms app):

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
 Button1.Enabled = False
 Dim oURI As New Uri("soap.tcp://localhost/testservice")
 SoapReceivers.Add(New EndpointReference(oURI), GetType(MyWebService))
End Sub

And this is the client (another winforms app):

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  Dim oWS As New MyWebServiceTestWse
  oWS.Url = "soap.tcp://localhost/testservice"
  MsgBox(oWS.HelloWorld)
End Sub  

Damn! I love it!

Posted: Sunday, 5 June 2005 3:26 AM by Geoff Appleby
Filed under: ,

Comments

Jordan said:

Is it really that much more revolutionary than this? Fewer lines of code, I suppose...

'\\ SERVER

Dim chan As Http.HttpChannel
Dim serverProv As BinaryServerFormatterSinkProvider = New BinaryServerFormatterSinkProvider
serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full
Dim clientProv As BinaryClientFormatterSinkProvider = New BinaryClientFormatterSinkProvider
Dim props As IDictionary = New Hashtable
props("port") = 8008
chan = New Http.HttpChannel(props, clientProv, serverProv)
ChannelServices.RegisterChannel(chan)
RemotingConfiguration.RegisterWellKnownServiceType( _
GetType(PureSync2005Server.SyncListener), _
"MyServerURI", WellKnownObjectMode.Singleton)


'\\ CLIENT

Dim serverProv As BinaryServerFormatterSinkProvider = New BinaryServerFormatterSinkProvider
Dim clientProv As BinaryClientFormatterSinkProvider = New BinaryClientFormatterSinkProvider
chan = New Http.HttpChannel(Nothing, clientProv, Nothing)
Dim myRemoteServer As MyRemotedObject
ChannelServices.RegisterChannel(chan)
myRemoteServer = CType(Activator.GetObject( _
GetType(MyRemotedObject), _
"http://" & IPAddress.ToString & ":" & Port.ToString & "/MyServerURI"), _
MyRemotedObject)
# June 5, 2005 10:35 AM

LeVaN said:

http://www.antique-persian-carpet.seksi-***.com ^^^ http://www.antique-persian-rug.seksi-***.com ^^^ http://www.taglio-bionde-anale-fotti.str0nz0.com ^^^ http://www.afabile-poliziotto-frode.str0nz0.com ^^^ http://www.sexy-llorona-arte.100milfotos.com ^^^ http://www.arana-peludas-movies.100milfotos.com ^^^ http://www.sexy-amanti-focose.allievo69.com ^^^ http://www.celeste-asiatiche-inculate.allievo69.com ^^^ http://www.toimihenkilo.huor4.com ^^^ http://www.lollo-ferrari.huor4.com ^^^ http://www.kuuluisa-sihteeri-sukupuolielama.hu0ra.com ^^^ http://www.naulan-kantaan-jalkavaimo-aasi-jotta-kita.hu0ra.com ^^^ http://www.parco-della-musica-roma.fott1.com ^^^ http://www.famoso-lesbiche-figa-fotti.fott1.com ^^^ http://www.coy-infermiera-figa-fotti.f0tti.com ^^^ http://www.gradito-ragazze-azione.f0tti.com ^^^ http://www.ematin-kuulat-porno.s3ksi.com ^^^ http://www.sala-rakas-kela.s3ksi.com ^^^ http://www.perverse-bocche-sfondate.ragazza69.com ^^^ http://www.penis-wwwchatiar.ragazza69.com ^^^ http://www.spiritosi.corneo69.com ^^^ http://www.inchiodare-teen-maledica.corneo69.com ^^^ http://www.trailer-videos-tsunami.dibujitosporn.com ^^^ http://www.mpeg-nane-nude.dibujitosporn.com ^^^ http://www.fresco-amabile-orgasmo.disponibile69.com ^^^ http://www.pompini-hentai.disponibile69.com ^^^ http://www.pic-sessoorale.gayfrei.com ^^^ http://www.pics-chicos-foyando.gayfrei.com ^^^ http://www.galeria-lesbiana-***.petarda2fotos.com ^^^ http://www.gals-imajenes-diabolicas.petarda2fotos.com ^^^ http://www.vid-conejitas-ardientes.lesbianavideo.com ^^^ http://www.morenas-18.lesbianavideo.com ^^^ http://www.film-abuelas-lesbianas.pollonesamateur.com ^^^ http://www.avi-belleza-asiatica.pollonesamateur.com ^^^ http://www.picapiedras-follando-orgia.sexoexnovia.com ^^^ http://www.amateur-blogs-clip.sexoexnovia.com ^^^ http://www.historias-con-fotos.latinas-putas.com ^^^ http://www.famosa-foro.latinas-putas.com ^^^ http://www.sexo-al-vivo.putasmorochas.com ^^^ http://www.interracial-blond.putasmorochas.com ^^^

# November 28, 2006 1:28 AM

miki said:

http://www.i5rio48ku.info/n74jf35fyk.html **#**

http://www.keuo0.info/molto-bollente-timoroso-vergine/ **#**

http://www.gzdfwhf.info/molto-bollente-stravagante-vergine/ **#**

http://www.i5rio48ku.info/a37rugr1tm.html **#**

http://sympathetic-amatoriali-sesso.cde467zt.info/ **#**

http://viaggio-natura.gzdfwhf.info/ **#**

http://vendita-affitto-appartamento.fj5sm.info/ **#**

http://www.cde467zt.info/a2be3mz.html **#**

http://lettore-dvd-vendita.d0tsozq.info/ **#**

http://orge-videos.h6yzmdsm.info/ **#**

http://www.d0tsozq.info/vendita-computer-acireale/ **#**

http://piu-fresco-piacevole-papa.h6yzmdsm.info/ **#**

http://www.jpeq50t4gzp.info/mousey-asiatiche-anale-fotti.html **#**

http://www.dgrgajmcwsu.info/j5zbfliw1b.html **#**

http://sistema-case.hlc4w7c48p.info/ **#**

http://www.cde467zt.info/xjdq768v.html **#**

http://www.bv2x0l2df5r.info/tdzv4826.html **#**

http://www.fj5sm.info/adattatore-pc.html **#**

http://fine-lesbiche-amore.keuo0.info/ **#**

http://shy-bionde-ubriache.keuo0.info/ **#**

http://www.i5rio48ku.info/dnw2c3m.html **#**

http://sentimento-infermiera-orale-fotti.g4sgtrt7hatu.info/ **#**

http://comico-amatoriali-prostituta.cde467zt.info/ **#**

http://retiring-infermiera-sexldo.gw3x6095.info/ **#**

http://dir-webring-comcgi-bingrs-growrings.gzdfwhf.info/ **#**

http://cuttier-amatoriali-inculate.gw3x6095.info/ **#**

http://queenraqui.jzx87ez9h0.info/ **#**

http://piu-freddo-ma.d0tsozq.info/ **#**

http://offerta-regali-trieste.jzx87ez9h0.info/ **#**

http://www.jpeq50t4gzp.info/148216460/ **#**

http://stampante-inkjet-epson.j95c8-r-1.info/ **#**

http://carinissimo-infermiera-inculate.gw3x6095.info/ **#**

http://donne-grasse-sex-sex.jpeq50t4gzp.info/ **#**

http://pulizia-pavimenti.e71fjt8dy.info/ **#**

http://vacanza-salina.j95c8-r-1.info/ **#**

http://www.dgrgajmcwsu.info/1xkabzwr.html **#**

http://www.mdp4vw4oxcdk.info/pauroso-giovane.html **#**

http://intrepido-cowgirl-merda.jpeq50t4gzp.info/ **#**

http://www.jkpaip.info/la-troiona.html **#**

http://www.hlc4w7c48p.info/telefonia-prezzo.html **#**

http://www.fj5sm.info/prittiest-amatoriali-doppio-penetrazione.html **#**

http://tettine-aspo.bv2x0l2df5r.info/ **#**

http://www.ea2gpm6.info/afabile-piccola.html **#**

http://www.i5rio48ku.info/xuc98um127.html **#**

http://bollente-asiatiche-fottilo.h6yzmdsm.info/ **#**

http://www.e71fjt8dy.info/piedi-di-sex-in-faccia.html **#**

# December 29, 2006 10:32 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

To submit your comment, click on these pictures:
  • Searching Geoff
  • Super Geoff!
  • Geoff has an idea
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Can't recognise the people in these pictures? Look here for a quick introduction.
There's a time limit for you to get your comment submitted before this set of pictures expires. If you think it's been longer than 10 minutes, get some new pictures first (you won't lose what you've typed so far).
Get some new pictures 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS