WAS v8.5 > WebSphere applications > Web servicesWeb services
Web services are self-contained, modular applications that we can describe, publish, locate, and invoke over a network.
JAX-WS extends JAX-RPC with support for annotations.
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, 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 your business processes by integrating with applications that otherwise do not communicate. The inner-library loan program at your 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 your library, searched the collections and checked out your books. If you did not find the book you 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 your 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 your library with a web service to search their collection (the service might have been provided through Universal Description Discovery and Integration (UDDI), your results yield their resources. You might use another web service application to check out and send the book to your 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 the web service request uses to invoke the service.
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.
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 Java Specification Requirements (JSR) 109. The specification includes open standards for developing and implementing web services.- Artifacts used to develop web services
With development artifacts, we can develop an enterprise bean or a JavaBeans module into web services that are based on the Web Services for Java EE specification.- WSDL
WSDL is an 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
Java Architecture for XML Binding (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. WAS conforms to the WS-I Basic Profile v1.1 and WS-I Basic Security Profile v1.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
Enable web services through the service integration bus
Use WS-Notification for publish and subscribe messaging for web services
Reference:
Web services specifications and APIs