 So by default the whole document the style applies to each contained operation within that port type. Let us take a look at whether we gave it here. So for this binding the style equals okay so this is just the syntax for this is an example somewhere I will come back to that okay so it applies to every contained operation unless you want to specify it on a per operation basis which you can do which is normally not recommended right. So the transport attribute can be you know what is the transport you actually want to use so for HETP or so for SMTP. I think all the examples that we are going to show are going to use so for HETP in this particular case we have not done in SMTP examples here but it is possible and I have shown you some examples of soap messages using SMTP as well right. So at the operation level you can actually pick as well right this is the soap binding level it applies by default to all the operations at the operation level you can pick this as well and you can say that it is one of these two styles the operation itself is RPC oriented or document oriented and in the soap body there is something called the use variable and the use variable will tell whether it is literally transmitted as XML or whether it is encoded in some form and if so what is the encoding style right. So all of this information is essentially used for creating and on the wire representation and that looks different depending on what are the choices that you are making in these different parts of the specification of the wisdom itself. So I am not going to go through the details of this I think it may be too much detail for now but you know you have the handouts which include this and we can come back and talk about it. So again these are some examples here is a hello service it is using RPC style with literal encoding right. So the port type is called a hello IF whatever that IF stands for and then under the port type there is a operation name is say hello and it has this parameter order. So there is an input message and is an output message associated with this operation. So this is again implicit nothing is explicit we are not created messages outside and then come back and included those messages it is implicitly defined in this particular port type right and then here is the binding that I am giving for this particular operation right. So I am going to use so port HTTP the style is RPC and the encoding is literal that is what I am using here for both my input as well as output the encoding is literal and I can it gives me a lot of flexibility to pick up different encodings for the input versus output and so on. I may not in most cases I do not use that flexibility it is very rare that I would say you know encoded in one way going encoded in a different way coming and so on. But it is there it is that the flexibility is there right no it does not say that RPC style just saying request response that is what that means in RPC style parameters are transferred in some order document style is the XML document is transmitted that is what it means. So the parameters are encoded in a particular order and sent versus in a document style it is just a document it has to be interpreted the order of the material has to be interpreted on the other side appropriately it may if it is if it is typed well the order may not even be important. So in this particular case what this service is doing is that it has two parameters string and integer it is going to concatenate it and return it back to you that is why that order is important because the concatenation will verify whether the string returned is the concatenation of the two strings that I said the string and the integer that I said. So this is a different way of doing RPC using literal as well right. So this is an actual example message it is a say hello and I am giving two specific parameters right. So the parameter order is going to be this so string one is this. So given the parameter order the on-the-wire representation will have it in this particular order is what it is going to do when it reads this right. So it had two parts to it and these are the two parts in the example message that I am sending. Pardon? If it is document type. No, no most tools will automatically generate it in fact a lot of this stuff like you will see today afternoon is automatically generated. So there are two ways of actually creating web services right. If you were to do it practically speaking there are two ways of doing it one is you have a Java class right at least this is with respect to something called JAXWS which is a framework that Java provides for creating web services. You have a Java class and you annotate your Java class with certain annotations that are provided for you right. So you say that this class becomes a web service or this class does not become a web service. And in that also you can say that certain methods are exposed as service methods some are not exposed as service methods. So you provide all these annotations and then you press a button and magically the wisdom is generated for you right you do not have to do anything the whole wisdom would be generated. Now you can see and there all the defaults are used while generating this or you can customize that template that exists. So IDEs do a lot of this magic behind the scenes but if you do not know what it is doing you could land in some trouble at some point in time right because they use all these defaults how do I customize the defaults what does the customization mean. So then you have to know some of this stuff otherwise there is no point in the other way of course creating a web service would be that you actually define the wisdom and IDEs give you different tools for defining such a wisdom document and then it will it stops down so it generates all the programming language classes needed to implement that web service that is the other way. So either you start an implementation and create a web service this is this would be typical for wraparing and stuff like that or you go the other way around you create a wisdom from scratch and you generate the implementation. So that's I think we are going to show both of them today is that right so we will show both of the ways of creating web services. So the choices basically are this your style and use variables will have these choices therefore you can make a bunch of combinations of this depending on whether you want to use the RPC style or document style and encode it or little styles. So this is an example of I mean not example this is characterization of when you might want to use these different styles so if you have procedure call obviously you will use RPC business documents can be sent where the document style and the procedure call has certain semantics associated with it the semantics are an operation a set of parameters coming in a particular order and I will interpret each one of those parameters in turn to be of a particular type that's what the receiving side is going to think of it as right so that's what I mean by procedure calls semantics as opposed to I sent a document and somebody knows how to interpret the document it can have things in any order but it has XML tags so I know how to pass this and interpret different aspects of so RPC has a method signature document styles have schemas and so on so this is some of the differences RPC synchronous in nature document styles are very synchronous in nature RPC is typically within your company whereas document styles are used outside company boundaries organizational boundaries right and that has certain implications of the kind of network that you're going to run on and so on right you can still achieve a request response to I think the important point of take away is that you can still achieve a request response to set up a web service in a request response mechanism using document styles is nothing that prevents you from doing that right it's just that the way that parameters get encoded on the wire look different right so if it is an RPC style it to it's assumed that it is a short response time kind of a scenario and therefore the way the parameters get encoded would have to have the order built into that in some way and so on so forth but in the case you I can still set up a web service that says takes an input message returns an output message it is going to be equivalent to a request response scenario using document styles nothing to prevent you from doing that remember we saw examples of both document style literal encoding as well as RPC style literal encoding for that my hello service right so this is not saying that RPC style is only used for request response and document style is not used for it you can do both right it's important to get that so the the other binding if you did not use HTTP over SOAP right if you did not use SOAP over HTTP or SOAP over SMTP the other binding remember was just to get in post binding so it allows applications to interact with websites essentially specify you know whether you are going to use post an address for the particular port that you are going to so this is not used often but it is useful to see an example of that so here is an example of a get in a form post returning some image right so here the message M1 has three different parts to that two strings and an int message M2 has an image which is of type XSD binary right so the and then you are going to create an operation called O1 under a port type ET1 which has an input message M1 and an output message M2 right again these are types of messages they can be reused remember that is why we say TNS colon this is the TNS is the name space for this which is not written in this particular document right so TNS colon M1 would refer to this message type and M2 to this message type so now I am creating a service where the so it has a particular port right and there is some binding B1 right and they the address is this now what is that binding B1 is specified down here right so I am creating a service with three different ports with three different bindings this is the same service so abstract service is the same right and they are all accessible it turns out at the same URL the address location is the same except there are three different ways of contacting the service right so what is binding one is it's a get binding right I am going to say that you will access it via an HTTP get it has this is the way that you would actually send it the different requests right and it would be of the output would be of image slash GIF it's you all heard of MIME types right so this is common in HTTP is common in your mailing clients that you use and so on so that's what we are going to use here as well and so the output is going to be of type image and the input which is the two whatever two strings and an integer is going to come here right so there is another binding type B2 which is also of type get right which is of type you are the encoded URL as a postal URL replacement here which is also going to return an output which is the same way right the same output that we had for the previous one so the third binding which is of type post it's a different different from the first two in that this is going to send some stuff within the message as well so this is going to be the input is going to be sent as if it were form data right so that's what this would mean it's a form encoded input and your output remains the same in all the cases all three cases doesn't matter it is just depending on how you going to send your input you're going to use your get or post methods in the case of post you would encapsulate it within the message body itself is form data in the first two cases it is part of the referencing URI itself okay so any questions any questions up till now if you're not reasonably familiar with some of the material well reasonably in a sense if you're not familiar with XML and you start looking at this huge number of XML documents it is a little confusing and discursing but if you do more of it obviously it will change very fast I'm not sure what this schema alternative is but it results in an XML schema okay now the only interoperable way is the only standard that exists I mean you could come up with your own definition of this it's not too hard to come up with such a definition yourself which doesn't include all this flexibility which is not targeted towards specifically the kind of applications do you have in mind but it won't be interoperable if you put it out on the Internet say anybody access they won't know how to access you know you want they won't have tools that will take wisdom which would today take wisdom and generate client stuff those tools won't exist right so those issues will come into play the notion of having a standard is so that you can have interoperability amongst anybody right you put something out anybody can understand it's like English right so if you all talk to save English then we can understand each other right if I talk something different the WSDL itself can't be different how can that be different the service implementations we don't care about who wrote the WSDL is the question now that may not be conformed it's possible that if you use vendor specific tools they will inject all kinds of nonsense into it that is you have to then not use the vendor I mean it comes down to that because remember if you want your consumer to be somebody who is not using that vendors products and you can't put out something that is proprietary to what that vendor is generating it's as simple as that right so it's what you should really do is to go back to that vendor and say hey listen you're the wisdom that you're generating is non-compliant therefore the in fact what will happen is that if it is non-compliant with respect to structure whatever receives the wisdom will remember the first thing it will do is try to do schema validation right which is a schema it will go to this it says on top right of the wisdom document here is a schema that this is conformant to and if that is not a W3C schema then probably it will junk it right then and then right if you include some proprietary schema that you are you are caching at some place then the validation will take place because all the tool is doing is validation of the XML document with the schema that exists on place right now if that is a non-standard schema the generation of the client stop code will not happen properly it will something will happen probably won't be correct so that that is a problem this is a problem that has persisted for aeons right standards have emerged but vendors have said they'll become more competitive by defeating the standard in some way right basically what they do is they'll add one or two proprietary API they will get you hooked on to using those API because they're convenience API and once you're hooked on to it you're stuck because you're becoming specific where you're stuck to that vendor that point it won't be portable the same thing will happen with the same thing happened with corba corba published a standard of what the interface definition language would look like for the API so the orb should look like and so on now every vendor who implemented that standard went and added one or two little API saying oh this is better to have that's better to have if I put this API it'll give me a competitive edge over the next vendor people started using it and once you start using it now I really can't take my code from here and put it into another vendors container not possible because the code expects these APIs are owned exist in the other vendors that's the problem so if we if it is then there is a problem and you should complain to the vendor that's that's the best advice I have no it's it's serious a serious issue right because the whole process the whole premise that this is going to succeed in the world is that will be interoperable everybody can consume everybody else's services and if that gets defeated what's the point vendor doesn't purpose no question about it a Microsoft wants everybody in the world to use Microsoft just like you know web logic would want everybody in the world to use web logic it's true with any product out there man right that's the ontology is is capturing the relationship and the style the relationship of different concepts to each other that's an ontology what do I mean by this is I'll give an example a car is an automobile this is a relationship something is a instance of something so there is a specialization generalization relationship that is happening here right so I could have an ontology for vehicles that will start with the route as some vehicle everything is a vehicle that can be a land vehicle or a sea vehicle it's a land vehicle it can be a truck or a car or SUV whatever right so I this this is an ontology of terms that I'm building up and these terms have a relationship between each other those relationships can be expressed in generalization specialization only one such relationship there can be other relationships as well between terms right so it that's that's just it and if you go take a look at the word net which is a ontology for the English language right so it captures the the the word relationships in the English language it may not be domain specific so it may not cover technological terms that I have right but it is all the generic English terms word net is one such ontology that is out there that you can use right like that everybody can publish their own ontology so for example you know the financial industry can publish an ontology having to do with financial terms loans loan rates prime lending rate all of these are specific to the financial industry what is prime lending rate it is something that is fixed by the federal government as the lending rate that banks give to other banks or RBI gives to the other banks the other banks will have a loan rate that is different than the prime lending rate right so these are all terms that are specific to the financial industry you can build an ontology of that such terms in the financial and so on now the problem that comes there is that I can define my ontology and you can define your own ontology for the same domain and they may look different so there is a way by which you can bridge these ontologies so there are technologies that allow you to basically say these two terms in these two different ontologies are equivalent to each other or are they related in some way to each other now I'm creating bridges between two different ontologies that exist right and once I create a bridge so for example when I say I create a web service that says I am looking for or I am able to provide let's say orchids right I'm going to deliver orchids orchid is a kind of flower as it turns out right on the other hand somebody else is looking for a web service that will deliver flowers right now there is something has to sit in between and say wait a minute somebody is delivering orchids and you are looking for flowers it could well be that you can use this service because there is some relationship between orchids and flowers so it's not an exact match of what you're looking for but there is a different kind of a match that I can give you do you want it is the question that you will ask right so there are four kinds of matches that are defined in semantic web services there are plug-in matches subsumption matches and so on that's why it's a little complicated subject but it's not an exact match but here is a likely match do you want it if so I will grade this match in some way and give it to you that is how ontological services will work that's how ontology will work and how will it establish the relationship that orchid is a flower there exists some ontology out there that the matchmaker is going to go read that says that a orchid is a particular kind of flower that's that's how it's that's how things are used and so the same thing comes with semantic web as well and I search for terms right now there's a literal search that is taking place if I search for orchids it will return orchid whatever it has to do with orchids the Google or any search engine doesn't necessarily understand the fact that of you know orchid is a flower and therefore somebody who's selling petunias might also be selling orchids so I might return that as a possible now to make that link you need semantic information which is metadata that is encoded about my site right and that's where that's how you get the semantic web right when I have semantic metadata that is encoded as part of my site information the search engine can become smarter now that's a semantic web right well web 2.0 is not the semantic web 2.0 has a number of technologies no definition of web 2.0 mashup technologies is web 2.0 what is mashup technologies I have a website which has multiple parts each part is coming from a different service that is being provided somewhere possibly web services my site is a composed site in other words that's mashups that's that's not necessarily saying semantic web semantic web is a different notion this is a notion of semantic right hmm hmm right right okay so we drew a diagram yesterday do you remember the diagram we drew a fully connected graph then we replaced it with a notion of a bus so we'll have to go back to the diagram so what is AI doing AI is correcting different applications that's what AI right enterprise application integration you're integrating a billing system with inventory system with something else system and so on and so forth there are two ways of doing that every system is written in some proprietary API there is no standard right so Siebel has its own API for CRM or portal has its own API for billing so on and so forth right each one of them may be written in a different programming language it because you in the human interacts with them through a UI he doesn't realize how it is written he doesn't even care how it is right the current department which is interacting with portal as a UI presented to them a web UI or whatever UI so they don't care about it but it turns out that if this is Siebel which is a CRM system and this is portal this may be let's say portal was written in Java and this was written in C++ right now how do I make these two things talk to each other I want Siebel data to get customer records from portal right I made a billing entry in my system and I want that information to flow automatically to Siebel how do I do that that is where you use any number of AI technologies you build some kind of a bridge right which will transform customer records sitting in portal to a form that can be accepted by Siebel which is understood by Siebel and will also bridge this language interoperability issues database issues whatever issues there are it may be they both have different database schema I have to do this translation and write it out to the other database right now if this is okay for two applications fine build a bridge no problem if I have a thousand applications or 500 application even a hundred applications this becomes a very messy picture right potentially I'm going to have a hundred by hundred matrix which says which applications talk to each other application right so I have application one two three whatever right and I want two to talk to three I want two to talk to one two to talk to 27 whatever it I'll perform this matrix now I have to build point to point bridges that will do data transformations that will do in order for Siebel to call some function in portal I have to call API written in different language written into whatever standard it may not be remarkable God knows what issues are right but your data transformation is specific to the application it has nothing to do with C++ so I have a customer record how Siebel represent the customer record is Siebel's problem not C++ issues it's Siebel may write it in any which way how portal represent customer record is what portal the company decided to do it has nothing to do with the fact that Java was used right so there are more larger complications than just writing a generic language to language it would be a nice thing but even there there are a myriad of languages I could write my application in Perl and give you a nice UI so you will write language to language bridges also quite a large matrix it's not very small but it won't be as big as the application to application matrix right so and languages are also evolving versions are evolving so I have to keep rewriting these bridges every time the language evolves a bit goes from one version to another so that issue is there instead of doing this building this graph which can get complicated what we are saying is that you basically do AI in a way that will expose each one of these applications as a in a standard way and every applications API are exposed as a set of web services in other words right so any application wanting to talk to another application will know how to call it at least first thing because it is called as a web service the technologies now will not become a barrier the technology barrier goes away the barrier of data translation still remains it's not going to go away right so for that XML actually helps this is called an ESB and what the ESB does is you can apply XSLT rules you can give XSLT rules to this ESB and instead of actually hand crafting a bridge I will use XML technologies translate all the data from application one into XML apply a certain set of XSLT ruins that I have coded as opposed to handcrafted bridge and that will transform data into other other formats now the person has an enter service setup on his server now we have an external system and we have an empty one of these UI rules so we have an empty external system and we hold that server and we return messages But how are you sending the message to the bank right, you are sending it to a bank Suppliers, okay so you are sending an EDI message to some trading partner But our XML technology is being used there, no We honestly did not have time to actually explore and understand what this device is We only created collaboration with it, okay, created by it But we know that there are certain methods involved because it says we will use a jm associated web service You will get a start web service Okay Yeah so I am also not certain what this GUI is or what the tool that you are specifically using is But is the question that is this amenable to is EII, this kind of EII that you are using amenable to using web services Is that the question or I would have to look at the specific application myself, I don't know what is the specific application you are talking about See anything even a jms2 can be exposed to web services, it is not like if I have an MQ series I can expose it as a web service So what is the question, just exposing things as web services is not going to make me service oriented in nature That is the other thing, right, even though web services are a specific instantiation of the service oriented architecture It doesn't mean that if I stick 3 web services I am service oriented in nature, not at all too So the principles of service oriented architecture of loose binding, I mean loose coupling, dynamic binding All have to be used in building your systems, if you are not using those you are not service oriented You may be using some web services which is okay, right Just using web services is not a guarantee of nirvana of any kind It could complicate your life even further, it is very possible So the promise that this brings to the table however is precisely what I have just drawn here Is that instead of having a number of point to point interconnections that you are building with different applications You would simplify this diagram in some way and this would be what the simplified diagram would look That is the promise this brings to the table, you know if you are already doing, if you have a point to point integration situation I will seek to replace it with an enterprise service boss of some kind I will seek to replace all these point to point bridges that I have built, I will throw them away Instead I will build bridges that will talk the ESB language on one side all the time, right That is the promise this brings to the table, now this is what you should be looking to do in this scenario Right now what you are doing is you are doing a specific point to point filter You are building this filter for data coming from somewhere converting to EDI in a specific format And then sending it to this provider, you are building one of these bridges Imagine as an architect if you have to worry about a thousand of these bridges That is where I am coming from, right You have a thousand bridges to maintain it could be a nightmare, right So we want to move away from that at that point in time If you are just like I said if you only have two applications in your company You are only going to have two applications in your company They are talking to each other, forget web services, forget all this stuff Just let them talk, make them talk to each other by any each way you can Right a Perl program, dump data into a file, read the file, transform it into another file Anything can be done It is a waste of time trying to invest in web services and other stuff Finding a service from registry and then importing it Because we are already doing it for you It is okay, it is not this Oh partly, partly you are So if you are hard coding the use of a specific service all the time Then you are not loosely coupled anymore, you are still tightly coupled to that service Right, so neither are you dynamically bound So that is really not what this is meant to be Then why you use web services? You might as well use Java or Korba or something and call it You just want a remoting architecture Many remoting architectures exist including DCOM Good solutions that have worked for a number of years So why use this, no need Because they are fully useful only for B2B kind of scenario Then what kind of impact should an end user see? The kind of impact the end user would feel is that All the humans were taken out of the loop The efficiencies to be gained would be passed on to the end user This is a standard thing, right? Somebody was talking to me yesterday about a registry of these numbers You were talking to me, right? So they have this registry of numbers So if I don't want to be bothered with the 20 odd calls that I get Every day from telemarketers trying to sell me some Give me money, right? Every day some bank calls me saying I have loan for you, 33 lakhs, whatever So I don't want these calls, I don't want any loans, right? So I register my number with the registry that these people have built Then it takes 45 days for this to become effective Why? I want it to be effective like this Everything can be automated My argument is that any legal process can be automated Now why is it taking 45 days? Some human is probably scanning it I don't know, why is it? Nothing can take 45 days in computers Unless you are processing the Mars landscape or something like that Which takes very very large computers to process There is a possibility that the registry needs to be physical I can register on your behalf and you don't want So you get authentication from me You ask me to authenticate myself somehow when I register It takes for authentication by the service provider That's the end user benefit So But there is no benefit to the service provider No, no, if you want end user benefit You take the provider out of the loop Same thing with service is provisioning If I sign up for call forwarding It will take some number of days for them to provision Maybe one day, two days, whatever What I want is a scenario where I sign up on the web For call forwarding for my account And next minute call forwarding is working Authenticate me, how can you not authenticate me? Ask me for some authenticating information that you have How hard can that be? It's not hard to do these things Right? So that we should do Depends on the size of the organization If you are going with a million employees With 1,700 applications spread over 100 countries You will need it It's larger than most countries themselves So It depends on the size of the organization If you have two services, if you have company with 20 employees Employee can shout across Here's my service and that way you can hook up to it Don't need it It just depends on your situation You got to analyze every use case separately Every case has to be studied separately But if you are not doing dynamic search If you may not need to do dynamic search When do you need to do dynamic search When you know the service registry is getting updated constantly I may find something better tomorrow