FileDocCategorySizeDatePackage
BeanService.javaAPI DocApache Axis 1.41432Sat Apr 22 18:56:52 BST 2006samples.userguide.example5

BeanService

public class BeanService extends Object

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringprocessOrder(Order order)

        String sep = System.getProperty("line.separator");
        
        String response = "Hi, " + order.getCustomerName() + "!" + sep;
        
        response += sep + "You seem to have ordered the following:" + sep;
        
        String [] items = order.getItemCodes();
        int [] quantities = order.getQuantities();
        
        for (int i = 0; i < items.length; i++) {
            response += sep + quantities[i] + " of item : " + items[i];
        }
        
        response += sep + sep +
                    "If this had been a real order processing system, "+
                    "we'd probably have charged you about now.";
        
        return response;