Google Search

Google
 

Thursday, July 24, 2008

Video: High Level SOAP Messaging with WSE2.0

Presenter:Mike Taulty

WSE2.0 enables SOAP messaging without IIS or HTTP. In this session we'll check out the high level API that lets us write these kinds of services.

The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video


Minute 0

Hello and welcome to this net framework the session 1 in a series of short sessions with a five to 10 minutes illustrating how you can do things with the net framework minus Mike Tolkien are looking the developer and platform group in Microsoft in the UK and in this particular session were going to take the Web services enhancements or was he as it is affectionately known round here and version 2 0 I had a look at how we can do so presaging between two pieces of software without involving ISO rested on her and just any soap messages over TCP and particularly again in this estimate that a high level API Dulcinea session on the lower level API are doing this work so that struck straight into visual studio and how to handle these were of services without anything on it so that it is make project and make the project here and will call it turns that cities console application wouldn t call it

Minute 1

Has a nice this little front of me as this is just a plain old console application and I want to work with them with U2 in this project so I want to do is just over a year and a sunset property and was it to dialogue to save and working with was it it which adds in a reference also changed my cultivars are slightly forming an opinion on a number ofis to programme the Council user services and would use web services messaging and will probably need addressing the classless Britain I had my way and so programming with this high level API is very much like writing Web services in a spin on their essentially what we do is rewrite a class so much a radical as Fiat let s call this on my service and we derive it from a class in the frame

Minute 2

Are called soap service and then once we got that need somewhere very stand sitting the things a little ability for construction on here and only have methods so just to illustrate the point of try to do anything compared if you let a method called out and stand at two numbers together for us against a weakened his businesses are well within my life skills in programming a right and if I want to make this a part of my soaked surface then essentially just like adding a forgotten and I would actually this with my method is so keen and soap messaging was whizzy to I attribute it as soap method and gay bashing to specify an explicit soap action on his wonders whether you are then on here and will go for are my my soaked action is allowed with me daddy done that I have actually built my web servers

Minute 3

This point the only thing I hadn t thought which I would have if I was building a speed on that one and I don t have here it is essentially a mechanism for intercounty editing instances at the servicing and listening to messages to come and we need to put that mechanism in place and with the Alps is out again here I understood all the heavy lifting for is in fact essentially working as a collection of soap receivers today and you can add things into this collection and add things what you have to provide is a single and an endpoint reference and the type of your receiving class which in my case would be my service already fat you can just provide a single instance of that thing in which case messages will be delivered that it is so ideology is okay and another 9 0 and I want to provide a new instance of my class at a service we now need to create that endpoint reference so will do that and in the simplest case here I can basis around a

Minute 4

I played some of my new I so would use perhaps just a variable called URI finally I m afraid you I working backwards here is my new work programme in technique and will use this soap TCP transport the case as a transport that was he too adds average soap messaging without bias without HTTP and what s I got that you arrive at which it stood at TCP are listening on a local machine as the sample 1990 on an address for my service and would just add something to keep this application live at the root of line in their hand will write at something to say that we are listening and let s build facts and run it because we claim to be listening but if it is to equip giant nets that are something to suit Pacific is

Minute 5

Having listening to reconsider that I listening or 1990s at his inner listening on the soccer waited at traffic to write a weekly done somewhere okay so we ve got service their earned what we do about to building a client of the service while I dearly want the light programme and it is a proxy as opposed to write anything else and we can get a proxy bill to the service by using a tool call was the whistle to exe which lives in the installation folder for the whizzy so if we run a bus service here and without it over to another console application that is clear that screen because one show here is that we can use that this was it little to exe program to hear our invoking this and provide indeed you are itemised services so that the 39099 service and asking it to generator a proxy

Minute 6

Of what we call my service proxy Dunciad and if I run this will all find is that I get an error and I only listen here because this is something you likely to see you doing this with as uncommon from airspeed on their difficult act services open to stop debugging it the reason why we are getting this error is because this method here takes two parameters in a de expectation here is that this method will only take one so what we have to do well essentially we don t make ourselves a classless colour and parameters let s put into their republic just 13 sake end accident why we will program actually visit that s fine and will go ahead and change this function so that it takes on at parameters typed as opposed to ex unwise integers and will return to your ex close to your account and if we save that build its run at

Minute 7

Vases listening their regard again and skips and for its whistle and build a proxy from that day to this time that works fine and we get a proxy data so we ve got a proxy despite let s go and build a client to figure out a little studio that is to stop debugging the second others is a second application he ll just added into the solution will make another console application that works out my client and what not to do so this client is added to the client the proxy that we just makes it is going to go to the solution here and add an existing item about a BT town nuggets my service proxy to have added that go into here if we look at this you ll see that essentially this code is in a class that derives from the so planting a something is derived from St Klein or a sofa about a code lets go as if we can invoke that saying so is my service at NSE does knew my service

Minute 8

My service it is being read on we can do ad lets out and a new and parameters and cable have to construct that things are let s just make one of those and parameters he was new and parameters p X to 10 feet at why it was 20 and a past that rather than try to create one on one line and we should get back a result am shelter at Castle result is result consul at Reliant works let s see if we can get both of these processes running at the same times will start at the service didn t start nothing and we ll start of the clients that s going to go and start nothing works and we could build there are let s have a look at that stop debugging the service was second

Minute 9

Allegheny forgotten to add references that was easier so let s just go to the client here said planted using with the archaic rebuild should be fine but again start at the service at Butler and I and he can have on screen and let s debunk the client and client runs and it wasn t some time then outfitted vital comeback with the right number as it does reconstruct the 30 big advantage here is that we are still doing real soap messaging moves with was the standard implementation so we can do attachments we can do security on we can do policy all the things we expect from was you were a service we can still do here are over this TCP Channel and just to show that so that it is really flying backwards and forwards let s disco and other trace utility and have a look at those messages that is just go and then start of trace utility switches can

Minute 10

On trace utility here and trundled out and start tracing messages Allah is change the configuration file of the client so that we can and see the messages of his embarrassment for a service can add in some increasing consideration here it is just a specific stuff that wouldn t get facing and the Confederation file this rebuild together confront the right place and again if we don t debug it is service start at most than debug the client There are and that those two things running the client should talk to the service and that should drift through the tracing to a goal and that was fun and I got a taste message here or at the traced exchange really see that the client sent a message and the messages are essential as are parameters with Iraq s

Minute 11

Widely across notice that was using the good exam hairdressing and security headers in here just as a matter of course I can look on the message that came back to the client we can see that he is also a body with value coming back and we just put out an album called in their hand just as my default based on return parameter from the method I never got on with the headers in the message as well so just a quick last word here before we finish up your to visual studio with an application 20 Windows the eventual debugging what I wanted to point it out was that on both sides of this equation here on the service were using a classical search service here on the client in the proxy music classical soap client can only look at the lower level API will see the same kind is a service derive respectively from classical soap Santa receiver which form the low level API

Minute 12

And it s important always remember this because it means that if you are using soap service also climb you can get back to that base class functionality to desert very very simple example I already want to run to do anything too complicated to little wandering out of scope but it is a very very basic example on this soap service that we ve written here we can still go back and do things that override functionality comes from a base class to fences on a lower level API instead of getting soap messages delivered to your methods essentially you get the the possibility of receiving those messages directly themselves if you look you have a function called receive and you can see that this action operates at that level of a soap envelope rather than a message call is such dropped the based Lassa Lamont is doing some work for us in order to take a soap envelope and rooted across to this method here then if we wanted to perhaps do something similar cells

Minute 13

We could do something like perhaps getting hold of the ad parameters occasionally to grab this from the envelope by calling get body on their only concern was listening back as her air at an ad parameters and we can actually just leave it at that and go there as it is to look at that point you are doing debugging a rather dreaded only further deserts of the couple of break points service now rebuilt let s run a service to those the service listening to a client to get to send the message what we should find is that debug breakpoints hit here and will be able to see that we re actually managed to figure the windows down that an icy get into the processing of this message at this point noticeably than our privacy figure struck with what colours we can see that here indeed is the set of parameters that are coming through and this is before any kind of routine to

Minute 14

To give methods goes on it if you wanted it is a lower level stuff the whole of the low level API is available to us prepress F5 to go from here we should find is the base class now stepped in and route is across to method so it s just done that 94 as a found the right method and is now going to colours and take return values back and send them back as soap envelope again but it s important to remember we are derived from such receiver is consequently we can always go a step in and it do other things if we need to do to summarise here what have we seen in a short session will be seen that there is a TCP transport that we can do web services out without involving HTTP and IIS and SP net and ready to offer is that it is and the programming API to be looked at here was a strength and services a client which is kind of a higher level API We saw how we can build proxies with was a little too and we also stand looked

Minute 15

Little bit at how does that low level API out to based rainsoaked sender as a receiver that we can use the of the messaging is well and look at that and another session where can you go to get more information about services well probably the best place to start would be an MSDN developer Santos that system is the end that Microsoft com services all one word there s some great stuff at their inner section on the left and cycled understanding Web services are some really brilliant articles that you could be there to get a good picture of what s going on in this area and if the something is seen specifically in this session only thinking hang on an a lot more information on that there feel free to drop me a mail and am told it Microsoft comes as a sunscreen there got a line and I ll drop your response other than that I look forward to hearing seeing you next time and thanks very much of his

Click here to go to original video page

No comments: