GLUE java2wsdl Tool

The GLUE platform includes a java2wsdl command-line tool for transforming Java services into WSDL descriptions. The command-line usage is as follows:

usage: java2wsdl <arguments>

where valid arguments are:
  classname                     name of java class
  -d directory                  output directory
  -e url                        endpoint of service
  -g                            include GET/POST binding
  -m map-file                   read mapping instructions
  -n namespace                  namespace for service
  -r description                description of service
  -s                            include SOAP binding
  -x command-file               command file to execute

Complete information on each argument is available online within the GLUE User Guide at For now, we will focus on the most basic arguments.

For example, consider the PriceService class in Example 6-4. The service provides a single getPrice( ) method.

Example 6-4.
package com.ecerami.soap.examples; import java.util.Hashtable; /** * A Sample SOAP Service * Provides Current Price for requested Stockkeeping Unit (SKU) */ public class PriceService { protected Hashtable products; /** * Zero Argument Constructor * Load product database with two sample products */ public PriceService ( ) { products = new Hashtable( ); // Red Hat Linux products.put("A358185", new Double (54.99)); // McAfee PGP Personal Privacy products.put("A358565", new Double (19.99)); } /** * Provides Current Price for requested SKU * In a real-setup, this method would connect to * a price database. If SKU ...

Get Web Services Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.