Home arrow Web Services arrow Page 3 - Web Services and J2EE
WEB SERVICES

Web Services and J2EE


If you would like to learn how to use SOAP, WSDL, and the Web services stack with J2EE, this article gets you off to a good start. It is excerpted from chapter 7 of the book Building Web Services with Java: Making sense of XML, SOAP, WSDL, and UDDI, written by Steve Graham et al. (Sams; ISBN: 0672326418).

Author Info:
By: Sams Publishing
Rating: 4 stars4 stars4 stars4 stars4 stars / 6
May 18, 2006
TABLE OF CONTENTS:
  1. · Web Services and J2EE
  2. · Enterprise JavaBeans
  3. · Roles: Development, Assembly, and Deployment
  4. · Benefits of Using Web Services with J2EE

print this article
SEARCH DEVARTICLES

Web Services and J2EE - Roles: Development, Assembly, and Deployment
(Page 3 of 4 )

One of the most useful aspects of J2EE is the way the architecture was designed from the start with ordinary people in mind. Early Web systems were often created from many different technologies, so the developer had to be good at programming in multiple languages and systems as well as understand the network, the database connections, system administration, and so on. For example, many of the early dynamic Web technologies mixed HTML with the programming language in a single file. This meant that a graphic designer couldn't modify the look and feel without risking breaking the logic—with the result the programmer frequently did the layout and HTML/Web design, or spent valuable time cutting and pasting HTML into their code.

The J2EE model clearly separates roles such as Web programmer, business logic programmer, deployment engineer, and administrator. To achieve this separation, there are clear contracts between the components and the infrastructure. For example, JSPs allow the HTML and page design to be separate from the business logic.

There are two important roles: the assembler and the deployment engineer. Both are like systems integrators. Like a brick layer, the assembler pulls together a set of components to create an application. Then the deployment engineer comes and wires and connects everything, like an electrician and plumber rolled into one. The mortar, solder, and cabling that keep it all together are called deployment descriptors.

Deployment descriptors (DDs) are XML files that capture information about components and applications. They help resolve aspects left undefined by the programmer, such as resolving references, setting policies, and linking to other components.

The following snippet shows a sample DD for an EJB:

<?xml version="1.0"?>
<ejb-jar>
<description>Simple Application</description>
<display-name>Simple</display-name>
<enterprise-beans>
<session>
<ejb-name>StockQuote</ejb-name>
<home>com.skatestown.StockQHome</home>
<remote>com.skatestown.StockQ</remote>
<ejb-class>
com.skatestown.StockQHome
</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>

As you'll see later, the same approach has been applied to the Web services support in J2EE 1.4, where a new DD—webservices.xml—has been added. This file is effectively the Java Standards version of the Axis WSDD file.


blog comments powered by Disqus
WEB SERVICES ARTICLES

- Dealing with Loose Coupling in a Service-Ori...
- Loose Coupling in a Service-Oriented Archite...
- Safety, Idempotence, and the Resource-Orient...
- The Resource-Oriented Architecture in Action
- Features of the Resource-Oriented Architectu...
- The Resource-Oriented Architecture
- Getting Started with Flex
- Automated Billing and Faxing for the Web
- An Introduction to Web Services
- The Foundations of Web Services: From Novice...
- Web Services Reengineering: Finishing Touches
- Fault Handling with Web Services
- Flow and Web Services
- Process Lifecycles and Web Services
- Business Processes and Web Services

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials