FileDocCategorySizeDatePackage
PriceListService.javaAPI DocExample1314Tue Oct 09 11:03:40 BST 2001com.ecerami.soap

PriceListService

public class PriceListService extends Object
A Sample SOAP Service Provides a Price List for specified list of SKUs

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

    products = new Hashtable();
    //  Red Hat Linux
    products.put("A358185", new Double (54.99));
    //  McAfee PGP Personal Privacy
    products.put("A358565", new Double (19.99));
  
Methods Summary
public double[]getPriceList(java.lang.String[] sku)
Provides Price List for specified SKUs. We assume that the client always specifies valid, current SKUs

    double prices[] = new double [sku.length];
    for (int i=0; i<sku.length; i++) {
      Double price = (Double) products.get(sku[i]);
      prices[i] = price.doubleValue();
    }
    return prices;