The Architectural Framework of Web Services


Figure 29.1 shows the players in a Web service framework, and Figure 29.2 illustrates one sample chronology of a Web service use case flow.

Figure 29.1. The Web service players.

graphics/29fig01.gif

Figure 29.2. The roles of the Web service players.

graphics/29fig02.gif

A service provider, for example, WebLogic Server, hosts a Web service that it advertises by publishing the service in a Service Registry (for example, a UDDI node may also be hosted by WebLogic Server). A client, which can be a browser or Java application, GUI, or another Web service, optionally looks up a service in the Service Registry to obtain the service's WSDL file. The service description WSDL file specifies to the client what operations are available, how to invoke those operations, and where (URL) to invoke them. The lookup is optional because the client may obtain the WSDL file in many other ways; it could even be in a predetermined location. A WSDL file may not even be necessary if the client already knows what, how, and where to invoke the service. The prescribed communication protocol between these players is SOAP, even if looking up a service in a registry. Of course, to use a registry, you must obtain its URL first.

Some of these technologies still lack the maturity, features, and in some cases, the critical mass required for supporting all possible business transactions. For instance, it is not practical for businesses to adopt the Web Service Registry, UDDI, due to inadequate partner agreement standards. However, Web services have evolved and gained traction with unprecedented speed. Although they are merely based on the evolution of ubiquitous technologies such as XML and HTTP, the potential effect they will have on business in the future could be revolutionary.

Steps 1, 2, and 3 shown in Figure 29.1 will be covered in Chapter 31, "Discovering Web Services." This chapter will focus on steps 4 and 5 of this process, as well as the inner workings of the Web service implementation.

Supported Standards

WebLogic Platform 7.0 supports the following Web service standards:

  • SOAP 1.1 with attachments

  • WSDL 1.1

  • JAX-RPC 1.0

  • UDDI 2.0

Again, this chapter assumes you are already familiar with these standards, their formats, and intended use. However, the format diagram shown in Figure 29.3 and Figure 29.4 serve to clarify the parts of a SOAP message and WSDL document, respectively, and also help define the vocabulary for these chapters. Embedded boxes represent XML subelements of the enclosing XML element. Listing 29.1 shows an actual SOAP message. You can also refer to Listing 29.2 later in this chapter for a fleshed-out WSDL file.

Figure 29.3. The parts of a SOAP message.

graphics/29fig03.gif

Figure 29.4. The parts of a WSDL document. Listing 29.2 later in this chapter shows a fleshed-out WSDL file.

graphics/29fig04.gif

Note

The HTTP header is technically not part of the SOAP message but is shown here for illustrative purposes only.


Listing 29.1 An Actual SOAP Message
 <env:Envelope  xmlns:xsd="http://www.w3.org/2001/XMLSchema"   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"   xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  <env:Header>  </env:Header>  <env:Body>   <m:calculateTax    xmlns:m="http://www.bea.com/statelessSession"     env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">    <productCategory xsi:type="xsd:int">1959</productCategory>    <zipCode xsi:type="xsd:string">80516</zipCode>   </m:calculateTax>  </env:Body> </env:Envelope> 

For more information on these standards, see the following links:

  • SOAP and WSDL are World Wide Web Consortium (W3C) specifications that can be found on the W3C Web site at http://www.w3.org.

  • UDDI is an initiative sponsored by a private consortium of companies. For more information, visit their Web site at http://www.uddi.org.

  • JAX-RPC is a Sun Microsystems specification based on JSR “101, accessible at http://java.sun.com.

Why WebLogic Web Services?

Web services are no more than windows to applications, be it large or small, simple or complex. It is therefore still critical, and more critical in some ways, for such applications to be scalable, efficient, reliable, and maintainable . Web services are all about real-time, instant, and round-the-clock access to information and applications. WebLogic Server, being a time- tested application server and market leader, is well positioned for the challenge.

Just as important, however, is the fact that the WebLogic Web service technology stack is all based on industry standards, which means Web service clients and servers built on the WebLogic Platform can interoperate with other standard Web service implementations in any programming language or programming model. In addition, version 7.0 now implements JAX-RPC, a standard implementation and deployment model for Java Web services, making your Web service code portable to other JAX-RPC “compliant servers.

Lastly, WebLogic Web services build on industry-standard J2EE components and are packaged as standard J2EE enterprise applications. You can therefore leverage your existing J2EE experience and investment in building world-class Web service offerings. For the non-J2EE developer, WebLogic Workshop provides one of the most advanced, intuitive, and powerful graphical IDEs (Integrated Development Environments) for quickly developing Web services without any server-side programming.



BEA WebLogic Platform 7
BEA WebLogic Platform 7
ISBN: 0789727129
EAN: 2147483647
Year: 2003
Pages: 360

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net