Web services
Web services are self-contained, modular applications that we can describe, publish, locate, and invoke over a network.
The application server supports web services developed and implemented based on the Web Services for Java EE specification. The application server supports the JAX-WS programming model and JAX-RPC. The JAX-WS is a strategic programming model that simplifies application development through support of a standard, annotation-based model to develop web services applications and clients.
A typical web services scenario is a business application requesting a service from another existing application. The request is processed through a given web address using SOAP messages over a HTTP, Java Message Service (JMS) transport or invoked directly as EJB. The service receives the request, processes it, and returns a response. Examples of a simple web service include weather reports or getting stock quotes. The method call is synchronous, that is, the method waits until the result is available. Transaction web services, supporting quotes, business-to-business (B2B) or business-to-client (B2C) operations include airline reservations and purchase orders.
Web services can include the actual service or the client that accesses the service.
Web services are web applications that help improve the flexibility of the business processes by integrating with applications that otherwise do not communicate. The inner-library loan program at the local library is a good example of the web services concept and its evolution. The web service concept existed even before the term; the concept became widely accepted with the creation of the Internet. Before the Internet was created, you visited the library, searched the collections and checked out the books. If we did not find the book we wanted, the librarian ran a search for you by computer or phone and located the book at a nearby library. The librarian ordered the book for you and you picked it up after it was delivered to the local library. By incorporating web services applications, we can streamline your library visit.
Now, we can search the local library collection and other local libraries at the same time. When other libraries provide the library with a web service to search their collection (the service might have been provided through Universal Description Discovery and Integration (UDDI), the results yield their resources. We might use another web service application to check out and send the book to the home. Using web services applications saves time and provides a convenience for you, as well as freeing the librarian to do other business tasks.
Web services reflect the service-oriented architecture (SOA) approach to programming. This approach is based on the idea of building applications by discovering and implementing network-available services, or by invoking the available applications to accomplish a task. Web services deliver interoperability, for example, web services applications provide components created in different programming languages to work together as if they were created using the same language. Web services rely on existing transport technologies, such as HTTP, and standard data encoding techniques, such as XML, for invoking the implementation.
The key components of web services include:
- WSDL
WSDL is the XML-based file that describes the web service. The web service request uses this file to bind to the service.
- SOAP
SOAP is the XML-based protocol that the web service request uses to invoke the service.
- Universal Description, Discovery and Integration Protocol (UDDI)
UDDI is the registry that hosts the service broker. UDDI is similar to the Yellow Pages in a phone book.
For a more detailed scenario, see the web services scenario overview information to learn more about the story of a fictional online garden supply retailer named Plants by WebSphere , and how this retailer incorporated the web services concept.
For a complete list of the supported standards and specifications, see the web services specifications and API documentation.
Subtopics
- Web Services for Java EE specification
The Web Services for Java EE specification defines the programming model and runtime architecture for implementing web services based on the Java language. Another name for the Web Services for Java EE specification is the JSR 109 The specification includes open standards for developing and implementing web services.
- (dist) Artifacts used to develop web services
With development artifacts, we can develop an enterprise bean or a JavaBeans module into web services based on the Web Services for Java EE specification.
- WSDL
WSDL is an Extensible Markup Language (XML)-based description language. This language was submitted to the World Wide Web Consortium (W3C) as the industry standard for describing web services. The power of WSDL is derived from two main architectural principles: the ability to describe a set of business operations and the ability to separate the description into two basic units. These units are a description of the operations and the details of how the operation and the information associated with it are packaged.
- SOAP
SOAP is a specification for the exchange of structured information in a decentralized, distributed environment. As such, it represents the main way of communication between the three key actors in a service oriented architecture (SOA): service provider, service requestor and service broker. The main goal of its design is to be simple and extensible. A SOAP message is used to request a web service.
- JAX-WS
JAX-WS is the next generation web services programming model complimenting the foundation provided by JAX-RPC. Using JAX-WS, development of web services and clients is simplified with more platform independence for Java applications by the use of dynamic proxies and Java annotations.
- JAXB
JAXB is a Java technology that provides an easy and convenient way to map Java classes and XML schema for simplified development of web services. JAXB leverages the flexibility of platform-neutral XML data in Java applications to bind XML schema to Java applications without requiring extensive knowledge of XML programming. JAXB provides the xjc schema compiler tool and the schemagen schema generator tool to transform between XML schema and Java classes.
- JAX-RPC
The JAX-RPC specification enables you to develop SOAP-based interoperable and portable web services and web service clients. JAX-RPC 1.1 provides core APIs for developing and deploying web services on a Java platform and is a part of the Web Services for Java EE platform. The Java EE platform enables you to develop portable web services.
- WS-I Basic Profile
The Web Services-Interoperability (WS-I) Basic Profile is a set of non-proprietary web services specifications that promote interoperability. WebSphere Application Server conforms to the WS-I Basic Profile Version 1.1 and WS-I Basic Security Profile Version 1.0.
- WS-I Attachments Profile
The Web Services-Interoperability (WS-I) Attachments Profile is a set of non-proprietary web services specifications that promote interoperability. This profile compliments the WS-I Basic Profile 1.1 to add support for interoperable SOAP messages with attachments-based web services.
Related concepts
Service-oriented architecture Overview: Online garden retailer web services scenarios
Related tasks
Use the UDDI registry Enable web services through the service integration bus Use WS-Notification for publish and subscribe messaging for web services
Web services specifications and APIs