Chapter 12. Extending Java EE Applications with Web Services


  • What Is a Web Service?

  • Consuming Existing Web Services

  • IDE and Server Proxy Settings

  • Creating a WSDL File

  • Web Service Types

  • Implementing a Web Service in a Web Application

  • Implementing Web Services within an EJB Module

  • Testing Web Services

  • Adding Message Handlers to a Web Service

IN THE FOLLOWING SECTIONS, you will learn how easy it is to create and add web services to Java enterprise applications (both web applications and EJB modules) and how to publish them so that they can be used by other applications and tested from within the IDE.

What Is a Web Service?

The W3C organization defines web services as follows: "A Web service is a software system identified by a URI whose public interfaces and bindings are defined and described using XML. Its definition can be discovered by other software systems. These systems may then interact with the Web service in a manner prescribed by its definition, using XML-based messages conveyed by Internet protocols."

The implementation for a web service can be done in any language, and a web service can be accessed by many different platforms, because the messages are XML-based. The J2EE 1.4 platform has a specification (JSR 109) for web services creation for web applications (Java EE web tier-based) and EJB Modules. NetBeans IDE supports the creation of such web services in Java enterprise applications, as well as the consumption of published web services within Java enterprise applications and Java SE applications.

Web services allow applications to expose business operations to other applications, regardless of their implementation. This is possible via the use of the following standards:

  • XML, the common markup language for communication. Service providers, which make services available, and service requestors, which use services, communicate via XML messages.

  • SOAP, the common message format for exchanging information. These XML messages follow a well-defined format. Simple Object Access Protocol (SOAP) provides a common message format for web services.

  • WSDL, the common service specification format. In addition to common message format and markup language, there must be a common format that all service providers can use to specify service details, such as the service type, the service parameters, and how to access the service. Web Services Description Language (WSDL) provides web services with such a common specification format.




NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

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