FileDocCategorySizeDatePackage
ProductService.javaAPI DocExample1377Tue Oct 09 11:03:40 BST 2001com.ecerami.soap

ProductService

public class ProductService extends Object
A Sample SOAP Service Provides Product Information for requested Stockkeeping Unit (SKU)

Fields Summary
protected Hashtable
products
Constructors Summary
public ProductService()
Constructor Load product database with two sample products

    products = new Hashtable();
    ProductBean product1 = new ProductBean
      ("Red Hat Linux", "Red Hat Linux Operating System",
      54.99, "A358185");
    ProductBean product2 = new ProductBean
      ("McAfee PGP", "McAfee PGP Personal Privacy",
      19.99, "A358565");
    products.put(product1.getSKU(), product1);
    products.put(product2.getSKU(), product2);
  
Methods Summary
public ProductBeangetProduct(java.lang.String sku)
Provides Product Info. for requested SKU. We assume that the client always specifies a valid, current SKU

    ProductBean product = (ProductBean) products.get(sku);
    return product;