Service-Oriented Architecture Introduction, Part 2
Web ServicesWeb Services is a specification for service invocation that includes HTTP as the transport type and a specially constrained version of XML called SOAP. SOAP (Simple Object Access Protocol) is a way of constructing an XML document in a format with a standard header and body. In a Java implementation, Java Servlets are used to accept HTTP requests on a network. Java Servlets that accept SOAP documents are also Web Services.
Implementing a Web ServiceWeb Services only specifies the way that is service method is invoked. It does not specify the way that the business logic for the service is implemented. A Java stateless session bean is one of the best ways to implement this business logic for use in a services architecture. A stateless session bean is a component that runs on a Java Application Server. The stateless session beans methods can be invoked across the network. They are invoked via Java Remote Method Invocation (RMI). This method of invocation is not very interoperable. Both the client and the server must be Java applications because the data is transferred via serialized Java objects. Also, the data cannot be passed through firewalls.
InteroperableTo solve this interoperability problem, tools from BEA and others allow the publishing of Web services from stateless session beans. These tools automatically generate a servlet that takes in a SOAP request, a proxy that the client can use to invoke the servlet and WSDL (Web Services Description Language) descriptions of the format of the interface. After your stateless session bean is published as a Web service, the component has two different transport types and two different payload formats. The service may still be invoked via RMI as well as HTTP/SOAP at the same time. Both of these methods of invocation meet the requirement of a service to be invoked across a network.
Discovery and LookupWeb services uses UDDI for discovery and lookup of services. UDDI stands for Universal Description, Discovery and Integration. It provides a registry for information about services, including a service's location and information on how to invoke the service. Web Service Definition Language (WSDL) is used by a UDDI directory to store information about services. WSDL is an XML schema that describes service interfaces, transport types, and locations. Other directory types may also be used for the same purpose.
ConclusionAll of the properties of a service-oriented architecture are supported by Web services. The J2EE Platform is a great way of implementing a service. By creating a robust business logic layer of services, an organization can achieve huge benefits. In my next article, I'll explore those benefits in some detail.
About the AuthorMichael Stevens is an independent consultant specializing in service-oriented architectures for the enterprise. He has over fourteen years of experience in information technology architecting and developing software systems, most recently focusing on J2EE solutions. He founded a software company that developed solutions for the mailing industry. He is a certified Java programmer, a member of the IEEE Computer Society, and of the ACM. He may be reached at firstname.lastname@example.org.
Page 2 of 2