12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Web Service Deployment Descriptors<br />

Web Service Deployment Descriptors<br />

NOTE<br />

Web services are deployed as part of a WAR. A single WAR can contain multiple <strong>web</strong><br />

services. You can also deploy multiple WARs with each containing many <strong>web</strong> services.<br />

The difference between a normal WAR and a WAR containing <strong>web</strong> services is the<br />

presence of an extra descriptor named <strong>server</strong>-config.wsdd in the WEB-INF directory. The<br />

<strong>server</strong>-config.wsdd file provides configuration information (the name of the <strong>web</strong><br />

service, the provider, any corresponding Java classes and allowed methods).<br />

There is one WSDD file per WAR and it contains information about all available <strong>web</strong><br />

services within that WAR.<br />

The typical component structure of a WAR containing <strong>web</strong> services has the following<br />

elements:<br />

■<br />

WEB-INF/<strong>web</strong>.xml<br />

■<br />

WEB-INF/<strong>server</strong>-config.wsdd<br />

■<br />

WEB-INF/classes/<br />

■<br />

WEB-INF/lib/<br />

The WEB-INF/lib also contains some standard JARs that are necessary for the Axis<br />

Runtime engine.<br />

To publish your Java classes as a <strong>web</strong> service, use the WSDD format to define the<br />

items that you want to deploy to the Partition. For example, an entry corresponding to a<br />

service named “BankService” can be:<br />

<br />

<br />

<br />

<br />

In this case, the com.fidelity.Bank Java class links to <strong>web</strong> service BankService. The<br />

class com.fidelity.Bank can have a number of public methods, but only the methods<br />

create_account and query_account are available through the <strong>web</strong> service.<br />

For more information on the <strong>web</strong> services deployment descriptor (WSDD), refer to the<br />

Axis User Guide located in /doc/axis/user-guide.html.<br />

Creating a <strong>server</strong>-config.wsdd file<br />

To create the <strong>server</strong>-config.wsdd:<br />

■<br />

Use JBuilder to generate the deployment descriptor as part of your WAR.<br />

or<br />

1 Use a text editor to write a deploy.wsdd file. Refer to the deploy.wsdd file in<br />

/examples/<strong>web</strong>services/java/<strong>server</strong>.<br />

2 Run the Apache Axis Admin tool with deploy.wsdd file (see “Tools Overview” on<br />

page 81) by typing:<br />

prompt>java org.apache.axis.utils.Admin <strong>server</strong> deploy.wsdd<br />

The <strong>server</strong>-config.wsdd file is packaged as part of the WAR.<br />

Chapter 9: <strong>Borland</strong> Enterprise Server Web Services 79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!