Presenter:Mike Taulty
The class Designer in Visual Studio 2005
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
Oh and welcomed as net framework nugget session 1 in a series of short lessons were learnt by the tenant is looking at how we can do things with the net framework minus m Tolkien are working the developer and platform group in Microsoft in the UK and this particular setup today to look at how we can work with a speed of network services and how we can make use mostly all the attributes code to control the XML that throws back the thought of as Web services control the soap messages of the rats of forwards and also some extent control the web service description language the whistle documents they get generated describe us that this is so expressed straight ahead day so here we are in visual studio net 2003 and I ve got a web service project if it is difficult look at it this web service Roger Cork people service and the ideas of his own quick look at is a very simple web service and you see that I ve got one where method called and get people in
Minute 1
It s a parameter that it is that you make any use of the structure is just as the decoration really and only returned into the classical person lest trashy person is the second to get it is the greatly one of those it has an array of people called people and we populate that array and only return the whole person list from the method everything quick that the person lest then essentially you see the person this is a very simple class and business just has an array called people of person objects as we take a look at the person outfit which is just here is it that person has her first name alas nine and an age in case a very very simple classes so if it is a look at what the soap was to look like for that particular indication of the operation of its look at the test patient that Webster is so the one that rested on it just makes for as they can see only one thing such
Minute 2
It which is quite handy and it is lots of messages that look like to invoke that Web service you can see that the service is run to be obviously an envelope the body and I don t have get people the Internet particular namespace will not have p which is readily such string handle and offers elements there so certain that get people is coming directly from his photographers and if they directly from there that element then p is coming directly from parameter name their and if we look at the way the message that comes back looks like again soap envelope were going to get people response would get people result became an emigrant had this list for people with persons of the undertaking very element centric approach to serialise in the XML and again those things come directly from my territory under whether they get people response to get people result and any other name is coming directly from my present class where XML serialised
Minute 3
It is deciding how to serialise then suddenly we have people and then within there we ve got an array of persons but first they must manage slithers them to come from the initiatives that play around this is to look at XML serialisation to forgot that I won t service the discloses files then when it is just excluded this particular person plus from the project and bring a little one that has included a sit within here with the very same class as person and person list of a thin attribute it differently with attributes from the XML civilisationwhich is just that control how they think that is serialise out onto a wire to is what we ve done is a sad person list should be a retail knuckle people we say that this array should be caught persons with an eye to the whole person and within here what we ve done is deserved on the present as herself first name addition
Minute 4
Element coffers lavish theatrical forename laceration in Agincourt last name and age and should be latter because he is struggled out that a different name to aged ages aged with is an better ego so it s aged the years through its rebuild the service and am just refresh test they so we can see that be the request hasn t changed He adds that the strain of the response has changed that is that we still got get people response as my but we ve got an array which has caught people document and that s what people within their we ve got them a rate for persons that is more correct and then we got person and person undertaking an attribute centric approach to serialise with XML this time around so change the way that the XML inside the distant body looks by applying XML serialisation attributes but what is wanted to change investiture over here or it s
Minute 5
The moment is that in putting content into thatwhich is not necessarily will want to weakened off exactly quickly and are looking at how we can change this and I m how we can change what s going on in the request I leave this and it sand also there s naming it he may not be what we want in that request to let a look at those things of the Whiterock Road and radio to the web service itself is time and bring down onto this wetness of the warranties use magical soap document that method can and then onto document metaphor we can say is we can say what the request element names constantly select call the request name my request for want of an adverse event and let s call the response element name my response very much as Bill don t have a quick look
Minute 6
Turned Tesco s refresh that the browser now that he request is coming in as a body with my request and it now has a body on the way back with my response in which he says isas well so we can change this to be a let s say I m requestyou ran for the requests com I must have responseyour own response stock councillor Robert Ashby goes right that her backer of and refresh the page again ac changesis as well as we got wasis there or if I wanted them but I was a bit perverse and I wanted this to be oneand this ancestor being differenthas likened it that was my my people and because I can describe changes XML serialised
Minute 7
To relieve eczema routinely concernedbecause you are an article that my people come to build that refresh and it is now the response document is claiming to be oneand the entire people are part of that document is is going to be another sweeping controller was wanted to change electricity what would we do and what it wanted change in a nifty as the distant backdrop of the second again and look at this method where this p is the front man which supply attributes to parameters and on and return types so we can say here this is that the XML element called them at all on my parameter annotate comes fromcalled you ran my parameter farm and just those of the race is getting a little Hitler to which is added to an attribute at this parameter is rebuilt at that point on the back protestation
Minute 8
Just lost it is grown drunk that spring then we ll see there now we ve got our body with a request parameter and apparent into myadvances cut straight to taking pretty explicit control all of just about everything within the envelope at this point the only thing we haven t done is taking control or of this element he has at the moment what the saying is either we just got this parameter that comes across the network that was rapid after this extra elements within controlling that name them here and so the response of enjoying it here but what if it is wanted at all what if you just want to the soap body that had the parameter in and that was that another response what you would response it has had to return value and that was that no extra element of law will again you can don t control the sling Sophie has gone their play around with this soap document methods are actually hear them a
Minute 9
Can do is we didn t set the parameters style to be a thing course at parameter style I have options of default which is overlooking her and their a figure with there here that s the still factory fresh in the browser to see what that soap envelopes that look like this then we can now see that for the request to have a bodyguard across the wire directly with my parameter in them are not getting any wrapping of that prematurely more and we can all see that on the body that comes back we get our people elements again without any wrapping on that so is taking control of just about everything at this point that occurs within the body of soap afloat so so so well here that term losses or to soak document messages is also so RPC method and actually give more around producing RPC encoded so now that s very out of favour these days and it might be that you need that because your caller is that expecting it if not the chances are you would go the document that was
Minute 10
As that s just the way the industry is gone currently well at RPC method is available there and also that of here we have front soak document service and RPC services while where you can specify an default across the whole service secretly set the parameters are there if he wanted to Andy can also set the routing style acoustic set routing style to be one of the two values request slip action saw that Sony is used to soak out an HTTP header to route the message to one of these particular methods or use the name of the request government to route to route the message to Swansea s particular methods so you can choose which runs as wrong as said you can also specify parameters style up here and across the service is opposed specifying on a permanent basis and again as a soap RPC service as well so you want to do obviously took it out on appear another use it got if the soap
Minute 11
Metadata route is that included the method onto a web service that schools do something and that s just the wet method on written bill that am take a look at the whistle document for it then worked in the whistle document is that strangely even though this method which is built to take over letters and returns and a return result you would see the day whistle contains a message for do something so out account Pacific and a message and do something so being uncaring is interesting and if we had a look at Dion the actual operation itself do something on this port type you notice it do something so that its input message and returns that passage of those diktats would result a way because we don t return anything from method and that is what happens if we don t say that explicit by using soap document method here are having one way on this is a
Minute 12
My operation and I m not going to return anything back to you as a builder that vertical refresh that little document or we should say is that it is cluttered than that though it kept what you see is anybody there do something so thin there is no to something so out of a collaboration you see that it is something I just has an input message and no output message and this is a useful thing to do if you ve got services only on that it is taking it and not returning anything out whether you roughly have those this is another question if you could have stuff that that s very subtle is one where it on because you were still reflects the decline doesn t have to wait from that it is not like to tell any information greatly so whether that is there is a took other athletes just to finish at the first whiff of missing out a vulture should really fun in ages ago is just a service after his appearance as a skipper or service her name article people service it lets you give us his name space on your and people service
Minute 13
Arm and the description on there as well this is a great service and if we did go builder sends out and look at the wistful document legacy that we might affect the target noticeable stuffiness was the document to be my people service com without documentation about service and it s a great service and evening service director and a cigarette out on a split with Harry especially for setting theenough from the crucial use of that particular attribute it so does the completeness will top that one must actually do we got here and that s the own web service binding attributes of the code of the moment we ve got to get people and we ve got do something that is that we don t do something to something warrant descriptors and is other than shall not make this a one way I will call their son let s have this returning to a chorus of her get bank balance do so at the we ve got some affair leaves of disparate set of methods who we forget
Minute 14
Always got to get bank balance and didn t really Marriot very well on this particular service is reckoned it was out in news three Web service binding attribute to a server of service binding and create two bindings this red service which is essentially going to give me one service with two different port types I remember living with Laporta s kind of like a common interface so what type has a bunch of operations on to have one service with any number of port types which means any number of interfaces if you like into that service so well in azaleas and will have a binding this is only my local is my people interface just want a better word and I will give it ayour own people interface decay and will have another one and this is grossly right bank interface and again your own
Minute 15
Bank interface to some very realistic but so this illustrates that the difference in two as a now do as I can move this particular operation here onto one of those bindings are put this on to my people interface back I m going to put the get bank balance onto my bank interface this to a radical bank interface added that if we build at this point always if the project was still further so much so such as that other group that little other is in essence this has now been partitioned so that the service description take local account is actually so want to talk people service a bad name at this point but that is the service now has two ports it has a Portugal bank interface and has a book or people interface supports the kind of like interfaces so one
Minute 16
We do what we wanted there and then out to the whole whistle document is split for a snack likely to be up there and you can see that turn the bank interface now has a separate little document to figures from face that in their okay then what was says that this guide describes the bank interface and the operation of the bank interface is set to get the bank balance of the messages that are thought to that and if we asked the league but people interface notice of us was all too obvious to forget about us was to hear they has it that this guy describes the people interface and his people interface their forget the corporation s answer for we ve now got I am one main whistle document describes service with two interfaces an average of those interfaces we go a separate chunk of visible
Minute 17
The messages and physical battles were fought so by doing that in binding this is really more of as an advanced topic but by doing that binding about Web services a code with this Western is binding will essentially be able to offer two interfaces from one service a fax report I can answer that the decidedly aware of that you can do that if you get to that that staging a new World Service developer just to summarise what have we seen in the short Sutton one Derek and other Web servers are knitted dress ready XML got serialise without an civilisation selection root XML elements et al attribute until we then looked at how we could flavour the sofa little bit and we look to how we could mostly look at soap document v soap RPC method is not so prevalent he says with a faith is so document acid and we could do things like throwing the request of the responseis an unnamed and Harry to chase a parody style and was one way method and so on
Minute 18
We looked at how we could set them the web service after these of the service itself for some simple things and was full like the name of the service the description of the service and theis used was the ultimate and finally we looked at that binding actually went since binding how we could use that to create multiple ports at the single service giving is effectively a couple into faces off on service where can you go to get more information about services well probably the best most starkly than MSDN developer Centre so that stiffeners the end that Microsoft com web services all one word there s some great stuff at there in the section on the left and cycle understanding Web services are some really good in articles equally there to get a good picture of what s gone on in this area and if the something is seen specifically in this session only thinking home an hour s more information on that there feel free to drop me an airline and told him Microsoft com has a seven screen their drop me a line and I ll got you response
Minute 19
Columnar and look forward to hearing seeing you next time as a
Click here to go to original video page
Thursday, July 24, 2008
Video: The class Designer in Visual Studio 2005
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment