Tuesday, June 02, 2009

Web Services Notes (Source)

Web Services Notes (Source)

For 2 business applications to communicate with each other (distributed computing env.) they need. 
1. A means for find and register a service
2. A transport mechanism to access a service
3. A way to define what the input and out parameters are

RMI existed before web services. There was not a well established protocol or overlapping protocols (UDDI and ebXML) in RMI to achieve each of the above. The advantage with web services is significantly higher levels of abstraction. They are language transparent (web services written in c and java can interface with each other), Container transparent (Services hosted on heterogenous environment/servers can interface with each other) and implementation abstraction (one service fewer assumptions about the implementation of the other service thus coupling between the 2 services is reduced). 



Service provider hosts several services some of which are web services.
Service repository hosts meta information about services and are lookup by service clients
3 in diagram above indicates the address at which the service is available, the signature of the service and others
4 & 5 is client binding to the web service and their consumption of service exposed in the web service

Web services are better than RPC 
1. Web services uses XML for data interchange so there is no developer written code to marshell or unmarshell data
2. XML data is interchanged using HTTP or SMTP which are well defined standards
3. The underlying service is specified using WSDL (hosted by service provider)
4. Web services can be searched for using UDDI


WSDL (Web Services Description Language)
- (pronoinced wisdel) (a form of IDL - Interface definition language) 
- Specifies a interface in XML and defines the XML schema and thus provides the vocabulary for defining interfaces like <types> and <message>. 
- Semantics of services like synchronous request/reply synchronous reply only and asynchronous communicate
- end point and transport  of the service using <service> element i.e. who provides the service
- encoding using <binding> i.e. how to access the service



No comments: