You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/05/14 01:30:37 UTC

svn commit: r170107 [8/10] - in /incubator/beehive/trunk/samples: controls-blank/src/pkg/ controls-db/src/dbControl/ controls-db/src/dbControl/util/ controls-spring/web/ controls-spring/web/WEB-INF/ controls-spring/web/WEB-INF/src/ controls-webservices-blank/ controls-webservices-blank/junit/ controls-webservices-blank/junit/test/ controls-webservices-blank/schemas/ netui-samples/ netui-samples/WEB-INF/src/ netui-samples/WEB-INF/src/org/apache/beehive/samples/controls/pets/ netui-samples/WEB-INF/src/org/apache/beehive/samples/netui/beans/ netui-samples/WEB-INF/src/shared/ netui-samples/resources/template/ netui-samples/ui/datagrid/ netui-samples/ui/popup/ netui-samples/ui/popup/getColorPopup/ netui-samples/ui/tree/ netui-samples/ui/tree/content/ netui-samples/validation/ petstoreWeb/src/org/apache/beehive/samples/petstore/controller/ petstoreWeb/src/org/apache/beehive/samples/petstore/controls/ petstoreWeb/src/org/apache/beehive/samples/petstore/controls/data/ petstoreWeb/src/org/apache/beehive/samples/petstore/controls/exceptions/ petstoreWeb/src/org/apache/beehive/samples/petstore/forms/ petstoreWeb/src/org/apache/beehive/samples/petstore/model/ petstoreWeb/test-src/org/apache/beehive/samples/petstore/test/ petstoreWeb/web/ petstoreWeb/web/WEB-INF/ petstoreWeb/web/WEB-INF/tags/beehive/petstore/ petstoreWeb/web/account/addresses/ petstoreWeb/web/account/create/ petstoreWeb/web/account/edit/ petstoreWeb/web/auth/ petstoreWeb/web/checkout/ petstoreWeb/web/search/ petstoreWeb/web/shop/ petstoreWeb/web/site/ petstoreWeb/web/webappRoot/ wsm-addressbook-enhanced/ wsm-addressbook-enhanced/WEB-INF/ wsm-addressbook-enhanced/WEB-INF/src-ws/web/ wsm-addressbook-enhanced/WEB-INF/src/ wsm-addressbook-enhanced/WEB-INF/src/org/apache/beehive/sample/ wsm-addressbook-fromWSDL/ wsm-addressbook-fromWSDL/WEB-INF/ wsm-addressbook-fromWSDL/WEB-INF/src/ wsm-addressbook-fromWSDL/WEB-INF/wsdl/ wsm-addressbook/ wsm-addressbook/WEB-INF/ wsm-addressbook/WEB-INF/src-ws/web/ wsm-addressbook/WEB-INF/src/ wsm-addressbook/WEB-INF/src/org/apache/beehive/sample/ wsm-blank/ wsm-blank/WEB-INF/ wsm-blank/WEB-INF/src-ws/web/ wsm-blank/WEB-INF/src/ wsm-employee/ wsm-employee/WEB-INF/ wsm-employee/WEB-INF/client-tests/org/apache/beehive/EmployeeDB/ wsm-employee/WEB-INF/src-ws/web/ wsm-employee/WEB-INF/src/ wsm-employee/WEB-INF/src/org/apache/beehive/sample/ wsm-petstore-dashboard/lib/ wsm-petstore-dashboard/src/ wsm-petstore-dashboard/src/ui/ wsm-samples/ wsm-samples/WEB-INF/ wsm-samples/WEB-INF/src-ws/web/complex/ wsm-samples/WEB-INF/src-ws/web/handlerchain/ wsm-samples/WEB-INF/src-ws/web/header/ wsm-samples/WEB-INF/src-ws/web/oneway/ wsm-samples/WEB-INF/src-ws/web/soapmessagehandlers/ wsm-samples/WEB-INF/src-ws/web/webmethod/ wsm-samples/WEB-INF/src-ws/web/webparam/ wsm-samples/WEB-INF/src-ws/web/webresult/ wsm-samples/WEB-INF/src-ws/web/webservice/ wsm-samples/WEB-INF/src-ws/web/xsdtypes/ wsm-samples/WEB-INF/src/ wsm-samples/WEB-INF/src/org/apache/beehive/sample/ wsm-samples/WEB-INF/src/web/header/

Modified: incubator/beehive/trunk/samples/wsm-petstore-dashboard/src/ui/PetStoreProductView.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-petstore-dashboard/src/ui/PetStoreProductView.java?rev=170107&r1=170106&r2=170107&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/wsm-petstore-dashboard/src/ui/PetStoreProductView.java (original)
+++ incubator/beehive/trunk/samples/wsm-petstore-dashboard/src/ui/PetStoreProductView.java Fri May 13 16:30:30 2005
@@ -1,478 +1,478 @@
-/*
-PetStoreProductView.java
-* 
-* Copyright 2001-2004 The Apache Software Foundation.
-* 
-* 
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* 
-*/package ui;
-
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.GridLayout;
-import java.awt.Image;
-import java.awt.Toolkit;
-import java.math.BigDecimal;
-import java.net.URL;
-import java.rmi.RemoteException;
-
-import javax.swing.BoxLayout;
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JSplitPane;
-import javax.swing.JTable;
-import javax.swing.JTree;
-import javax.swing.ToolTipManager;
-import javax.swing.event.TreeSelectionEvent;
-import javax.swing.event.TreeSelectionListener;
-import javax.swing.table.AbstractTableModel;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeCellRenderer;
-import javax.swing.tree.TreeSelectionModel;
-
-import org.apache.beehive.petstore.InvalidIdentifierException;
-import org.apache.beehive.petstore.PetstoreInventoryManager;
-import org.apache.beehive.samples.petstore.model.Item;
-import org.apache.beehive.samples.petstore.model.ws.Category;
-import org.apache.beehive.samples.petstore.model.ws.Product;
-
-
-
-public class PetStoreProductView extends JPanel implements
-        TreeSelectionListener {
-    private static final long serialVersionUID = 1L;
-
-    PetstoreInventoryManager store;
-
-    private JTree tree;
-
-    private URL helpURL;
-
-    private static boolean DEBUG = false;
-
-    private ProductDetailModel currentProductItemModel;
-
-    private ProductItemView currentProductItemView;
-
-    public PetStoreProductView(PetstoreInventoryManager store) {
-        super(new GridLayout(1, 0));
-
-        this.store = store;
-
-        //Create the nodes.
-        DefaultMutableTreeNode storeNode = new DefaultMutableTreeNode(
-                "Store name here");
-
-        DefaultMutableTreeNode storeInfoNode = new DefaultMutableTreeNode(
-                new StoreInfo());
-        storeNode.add(storeInfoNode);
-
-        DefaultMutableTreeNode productsNode = new DefaultMutableTreeNode(
-                new StoreProductInfo());
-        storeNode.add(productsNode);
-
-        //Create a tree that allows one selection at a time.
-        tree = new JTree(storeNode);
-        tree.getSelectionModel().setSelectionMode(
-                TreeSelectionModel.SINGLE_TREE_SELECTION);
-
-        //Enable tool tips.
-        ToolTipManager.sharedInstance().registerComponent(tree);
-
-        tree.setCellRenderer(new MyRenderer());
-
-        //Listen for when the selection changes.
-        tree.addTreeSelectionListener(this);
-
-        //Create the scroll pane and add the tree to it.
-        JScrollPane treeView = new JScrollPane(tree);
-
-        currentProductItemView = new ProductItemView();
-
-        //Add the scroll pane to this panel.
-        add(currentProductItemView);
-
-        //Add the scroll panes to a split pane.
-        JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
-        splitPane.setLeftComponent(treeView);
-        splitPane.setRightComponent(currentProductItemView);
-
-        Dimension minimumSize = new Dimension(100, 50);
-        treeView.setMinimumSize(minimumSize);
-        splitPane.setDividerLocation(100); //XXX: ignored in some releases
-        //of Swing. bug 4101306
-        //workaround for bug 4101306:
-        //treeView.setPreferredSize(new Dimension(100, 100));
-
-        splitPane.setPreferredSize(new Dimension(500, 300));
-
-        //Add the split pane to this panel.
-        add(splitPane);
-    }
-
-    /** Required by TreeSelectionListener interface. */
-    public void valueChanged(TreeSelectionEvent event) {
-        DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree
-                .getLastSelectedPathComponent();
-
-        if (node == null)
-            return;
-
-        Object nodeInfo = node.getUserObject();
-       try {
-            if (StoreProductInfo.class.isInstance(nodeInfo)) {
-                node.removeAllChildren();
-                System.out.println("Get all product catagories.");
-                Category[] categories = store.listCategories();
-                for (int i = 0; i < categories.length; i++) {
-                    node.add(new DefaultMutableTreeNode(
-                            new ProductCategoryInfo(categories[i])));
-                }
-
-            } else if (ProductCategoryInfo.class.isInstance(nodeInfo)) {
-                ProductCategoryInfo info = (ProductCategoryInfo) nodeInfo;
-                System.out.println("Get all products in: "
-                        + info.getCategory().getName() + " catagory.");
-                node.removeAllChildren();
-                Product[] products = store.listProducts(info.getCategory()
-                        .getCatId());
-                for (int i = 0; i < products.length; i++) {
-                    node.add(new DefaultMutableTreeNode(new ProductInfo(
-                            products[i])));
-                }
-
-            } else if (ProductInfo.class.isInstance(nodeInfo)) {
-                ProductInfo info = (ProductInfo) nodeInfo;
-                System.out.println("Get product information for: "
-                        + info.getProduct().getName());
-                currentProductItemView.setProductItem(info.getProduct());
-
-            } else if (StoreInfo.class.isInstance(nodeInfo)) {
-                
-                JOptionPane.showMessageDialog(this, "TBD... Get store information.", "TBD",
-                        JOptionPane.INFORMATION_MESSAGE);               
-           } else {
-                System.out.println("Unknown node type!");
-            }
-        } catch (RemoteException e) {
-            String message;
-            if(null != e.getCause()) message = e.getCause().getMessage();
-            else message = e.getMessage();
-            JOptionPane.showMessageDialog(this,message, "Exception",
-                    JOptionPane.ERROR_MESSAGE);
-
-            e.printStackTrace();
-        }
-
-    }
-    
-    protected Icon getImageIcon(Image image) {
-        if(null == image) return new ImageIcon(createImage("images/default.gif"));
-        else return new ImageIcon(image);
-    }
-    protected Image createImage(String path) {
-        //java.net.URL imgURL = new URL(path); // this.getClass().getResource(path);
-       // System.out.println("create image for: " + imgURL);
-       // return Toolkit.getDefaultToolkit().createImage(imgURL);
-       return Toolkit.getDefaultToolkit().createImage(path);
-   }
-    
-    private Image scaleToIcon(Image image) {
-        if(null == image)  image = createImage("images/default.gif");
-        return image.getScaledInstance(-1, 40, Image.SCALE_DEFAULT);
-    }
-
-    
-
-    class ProductItemView extends JPanel {
-
-        private static final long serialVersionUID = 1L;
-
-        private JTable table = new JTable();
-
-        private JLabel productIcon = new JLabel();
-
-        private JLabel productName = new JLabel();
-
-        /**
-         *  
-         */
-        public ProductItemView() {
-            super();
-            setBackground(Color.WHITE);
-            setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
-            productName.setAlignmentX(CENTER_ALIGNMENT);
-            productIcon.setAlignmentX(CENTER_ALIGNMENT);
-            add(productName);
-            add(productIcon);
-
-            add(table);
-
-            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
-            //Create the scroll pane and add the table to it.
-            JScrollPane scrollPane = new JScrollPane(table);
-
-            add(scrollPane);
-            Dimension minimumSize = new Dimension(100, 50);
-            scrollPane.setMinimumSize(minimumSize);
-
-        }
-
-        public void setProductItem(Product product) {
-
-            try {
-                productIcon.setIcon(getImageIcon(product.getAttachedImage()));
-                productName.setText(product.getName());
-                table.setModel(new ProductDetailModel(product));
-             } catch (RemoteException e) {
-                String message;
-                if(null != e.getCause()) message = e.getCause().getMessage();
-                else message = e.getMessage();
-                JOptionPane.showMessageDialog(this, message,
-                        "Exception", JOptionPane.ERROR_MESSAGE);
-                e.printStackTrace();
-            }
-
-        }
-    }
-
-    class ProductDetailModel extends AbstractTableModel {
-        private static final long serialVersionUID = 1L;
-
-        private String[] columnNames = { "itemId", "Product Id", "atr1",
-                "attr2", "attr3", "attr4", "attr5", "List Price", "Quantity",
-                "Supplier Id", "Unit Cost", "Status", "Add to Stock" };
-
-        Item[] items = null;
-
-        public ProductDetailModel(Product product) throws RemoteException {
-            items = store.listItems(product.getProductId());
-        }
-
-        public int getColumnCount() {
-            return columnNames.length;
-        }
-
-        public int getRowCount() {
-            if (items == null)
-                return 0;
-            return items.length;
-        }
-
-        public String getColumnName(int col) {
-            return columnNames[col];
-        }
-
-        public Object getValueAt(int row, int col) {
-            Item curItem = items[row];
-            if (col == 0)
-                return curItem.getItemId();
-            else if (col == 1)
-                return curItem.getProductId();
-            else if (col == 2)
-                return curItem.getAttr1();
-            else if (col == 3)
-                return curItem.getAttr2();
-            else if (col == 4)
-                return curItem.getAttr3();
-            else if (col == 5)
-                return curItem.getAttr4();
-            else if (col == 6)
-                return curItem.getAttr5();
-            else if (col == 7)
-                return curItem.getListPrice();
-            else if (col == 8)
-                return "" + curItem.getQty();
-            else if (col == 9)
-                return "" + curItem.getSupplier();
-            else if (col == 10)
-                return curItem.getUnitCost();
-            else if (col == 11)
-                return curItem.getStatus();
-            else if (col == 12)
-                return "";
-            else
-                return "Unknown Column";
-        }
-
-        public boolean isCellEditable(int row, int col) {
-            if (col == 7 || col == 12)
-                return true;
-            else
-                return false;
-        }
-
-        public void setValueAt(Object value, int row, int col) {
-            if (DEBUG) {
-                System.out.println("Setting value at " + row + "," + col
-                        + " to " + value + " (an instance of "
-                        + value.getClass() + ")");
-            }
-
-            String itemId = items[row].getItemId();
-            String productId = items[row].getProductId();
-            try {
-                if (col == 7)
-                    store.setItemListPrice(itemId, new BigDecimal(
-                            (String) value));
-                else if (col == 12)
-                    store.restockItem(itemId, Integer.parseInt((String) value));
-
-                items = store.listItems(productId); // refresh model
-            } catch (InvalidIdentifierException e) {
-                  e.printStackTrace();
-            } catch (NumberFormatException e) {
-                 e.printStackTrace();
-            } catch (RemoteException e) {
-                 e.printStackTrace();
-            }
-
-        }
-    }
-
-    private class StoreProductInfo {
-        public String toString() {
-            return "Products";
-        }
-    }
-
-    private class StoreInfo {
-        public String toString() {
-            return "Store";
-        }
-    }
-
-    private class ProductCategoryInfo {
-        Category category;
-
-        /**
-         * @return Returns the catagory.
-         */
-        public Category getCategory() {
-            return category;
-        }
-
-        /**
-         * @param catagory
-         */
-        public ProductCategoryInfo(Category category) {
-            super();
-            this.category = category;
-            System.out
-                    .println("build category info for: " + category.getName());
-        }
-
-        public String toString() {
-            return category.getName();
-        }
-    }
-
-    private class ProductInfo {
-        Product product;
-
-        /**
-         * @return Returns the product.
-         */
-        public Product getProduct() {
-            return product;
-        }
-
-        /**
-         * @param product
-         */
-        public ProductInfo(Product product) {
-            super();
-            this.product = product;
-        }
-
-        public String toString() {
-            return product.getName();
-        }
-    }
-
-
-    private class MyRenderer extends DefaultTreeCellRenderer {
-        private static final long serialVersionUID = 1L;
-
-        Icon tutorialIcon;
-
-        public MyRenderer() {
-
-        }
-
-        public Component getTreeCellRendererComponent(JTree tree, Object value,
-                boolean sel, boolean expanded, boolean leaf, int row,
-                boolean hasFocus) {
-
-            super.getTreeCellRendererComponent(tree, value, sel, expanded,
-                    leaf, row, hasFocus);
-
-            setIcon(getNodeIcon(value));
-            setToolTipText(getNodeToolTip(value));
-            setFont(new Font("serif", Font.BOLD, 15));
-            return this;
-        }
-
-        /**
-         * @param value
-         * @return
-         */
-        private String getNodeToolTip(Object value) {
-            Object nodeInfo = ((DefaultMutableTreeNode) value).getUserObject();
-            if (StoreProductInfo.class.isInstance(nodeInfo)) {
-                return "Click to get list of Products";
-            } else if (StoreInfo.class.isInstance(nodeInfo)) {
-                return "Click to get store information";
-            } else if (ProductCategoryInfo.class.isInstance(nodeInfo)) {
-                return ((ProductCategoryInfo) nodeInfo).getCategory()
-                        .getDescription();
-            } else if (ProductInfo.class.isInstance(nodeInfo)) {
-                return ((ProductInfo) nodeInfo).getProduct().getDescription();
-
-            } else {
-                return null;
-            }
-        }
-
-        /**
-         * @param value
-         * @return
-         */
-
-        private Icon getNodeIcon(Object value) {
-
-            Object nodeInfo = ((DefaultMutableTreeNode) value).getUserObject();
-            if (StoreProductInfo.class.isInstance(nodeInfo)) {
-                return null;
-            } else if (ProductCategoryInfo.class.isInstance(nodeInfo)) {
-                 return getImageIcon(((ProductCategoryInfo) nodeInfo).getCategory().getAttachedImage());
-
-            } else if (ProductInfo.class.isInstance(nodeInfo)) {
-                return new ImageIcon(scaleToIcon(((ProductInfo) nodeInfo)
-                        .getProduct().getAttachedImage()));
-            } else {
-                return null;
-            }
-        }
-
-
-    }
-}
+/*
+PetStoreProductView.java
+* 
+* Copyright 2001-2004 The Apache Software Foundation.
+* 
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* 
+*/package ui;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.GridLayout;
+import java.awt.Image;
+import java.awt.Toolkit;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.rmi.RemoteException;
+
+import javax.swing.BoxLayout;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTable;
+import javax.swing.JTree;
+import javax.swing.ToolTipManager;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.TreeSelectionModel;
+
+import org.apache.beehive.petstore.InvalidIdentifierException;
+import org.apache.beehive.petstore.PetstoreInventoryManager;
+import org.apache.beehive.samples.petstore.model.Item;
+import org.apache.beehive.samples.petstore.model.ws.Category;
+import org.apache.beehive.samples.petstore.model.ws.Product;
+
+
+
+public class PetStoreProductView extends JPanel implements
+        TreeSelectionListener {
+    private static final long serialVersionUID = 1L;
+
+    PetstoreInventoryManager store;
+
+    private JTree tree;
+
+    private URL helpURL;
+
+    private static boolean DEBUG = false;
+
+    private ProductDetailModel currentProductItemModel;
+
+    private ProductItemView currentProductItemView;
+
+    public PetStoreProductView(PetstoreInventoryManager store) {
+        super(new GridLayout(1, 0));
+
+        this.store = store;
+
+        //Create the nodes.
+        DefaultMutableTreeNode storeNode = new DefaultMutableTreeNode(
+                "Store name here");
+
+        DefaultMutableTreeNode storeInfoNode = new DefaultMutableTreeNode(
+                new StoreInfo());
+        storeNode.add(storeInfoNode);
+
+        DefaultMutableTreeNode productsNode = new DefaultMutableTreeNode(
+                new StoreProductInfo());
+        storeNode.add(productsNode);
+
+        //Create a tree that allows one selection at a time.
+        tree = new JTree(storeNode);
+        tree.getSelectionModel().setSelectionMode(
+                TreeSelectionModel.SINGLE_TREE_SELECTION);
+
+        //Enable tool tips.
+        ToolTipManager.sharedInstance().registerComponent(tree);
+
+        tree.setCellRenderer(new MyRenderer());
+
+        //Listen for when the selection changes.
+        tree.addTreeSelectionListener(this);
+
+        //Create the scroll pane and add the tree to it.
+        JScrollPane treeView = new JScrollPane(tree);
+
+        currentProductItemView = new ProductItemView();
+
+        //Add the scroll pane to this panel.
+        add(currentProductItemView);
+
+        //Add the scroll panes to a split pane.
+        JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
+        splitPane.setLeftComponent(treeView);
+        splitPane.setRightComponent(currentProductItemView);
+
+        Dimension minimumSize = new Dimension(100, 50);
+        treeView.setMinimumSize(minimumSize);
+        splitPane.setDividerLocation(100); //XXX: ignored in some releases
+        //of Swing. bug 4101306
+        //workaround for bug 4101306:
+        //treeView.setPreferredSize(new Dimension(100, 100));
+
+        splitPane.setPreferredSize(new Dimension(500, 300));
+
+        //Add the split pane to this panel.
+        add(splitPane);
+    }
+
+    /** Required by TreeSelectionListener interface. */
+    public void valueChanged(TreeSelectionEvent event) {
+        DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree
+                .getLastSelectedPathComponent();
+
+        if (node == null)
+            return;
+
+        Object nodeInfo = node.getUserObject();
+       try {
+            if (StoreProductInfo.class.isInstance(nodeInfo)) {
+                node.removeAllChildren();
+                System.out.println("Get all product catagories.");
+                Category[] categories = store.listCategories();
+                for (int i = 0; i < categories.length; i++) {
+                    node.add(new DefaultMutableTreeNode(
+                            new ProductCategoryInfo(categories[i])));
+                }
+
+            } else if (ProductCategoryInfo.class.isInstance(nodeInfo)) {
+                ProductCategoryInfo info = (ProductCategoryInfo) nodeInfo;
+                System.out.println("Get all products in: "
+                        + info.getCategory().getName() + " catagory.");
+                node.removeAllChildren();
+                Product[] products = store.listProducts(info.getCategory()
+                        .getCatId());
+                for (int i = 0; i < products.length; i++) {
+                    node.add(new DefaultMutableTreeNode(new ProductInfo(
+                            products[i])));
+                }
+
+            } else if (ProductInfo.class.isInstance(nodeInfo)) {
+                ProductInfo info = (ProductInfo) nodeInfo;
+                System.out.println("Get product information for: "
+                        + info.getProduct().getName());
+                currentProductItemView.setProductItem(info.getProduct());
+
+            } else if (StoreInfo.class.isInstance(nodeInfo)) {
+                
+                JOptionPane.showMessageDialog(this, "TBD... Get store information.", "TBD",
+                        JOptionPane.INFORMATION_MESSAGE);               
+           } else {
+                System.out.println("Unknown node type!");
+            }
+        } catch (RemoteException e) {
+            String message;
+            if(null != e.getCause()) message = e.getCause().getMessage();
+            else message = e.getMessage();
+            JOptionPane.showMessageDialog(this,message, "Exception",
+                    JOptionPane.ERROR_MESSAGE);
+
+            e.printStackTrace();
+        }
+
+    }
+    
+    protected Icon getImageIcon(Image image) {
+        if(null == image) return new ImageIcon(createImage("images/default.gif"));
+        else return new ImageIcon(image);
+    }
+    protected Image createImage(String path) {
+        //java.net.URL imgURL = new URL(path); // this.getClass().getResource(path);
+       // System.out.println("create image for: " + imgURL);
+       // return Toolkit.getDefaultToolkit().createImage(imgURL);
+       return Toolkit.getDefaultToolkit().createImage(path);
+   }
+    
+    private Image scaleToIcon(Image image) {
+        if(null == image)  image = createImage("images/default.gif");
+        return image.getScaledInstance(-1, 40, Image.SCALE_DEFAULT);
+    }
+
+    
+
+    class ProductItemView extends JPanel {
+
+        private static final long serialVersionUID = 1L;
+
+        private JTable table = new JTable();
+
+        private JLabel productIcon = new JLabel();
+
+        private JLabel productName = new JLabel();
+
+        /**
+         *  
+         */
+        public ProductItemView() {
+            super();
+            setBackground(Color.WHITE);
+            setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
+            productName.setAlignmentX(CENTER_ALIGNMENT);
+            productIcon.setAlignmentX(CENTER_ALIGNMENT);
+            add(productName);
+            add(productIcon);
+
+            add(table);
+
+            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
+            //Create the scroll pane and add the table to it.
+            JScrollPane scrollPane = new JScrollPane(table);
+
+            add(scrollPane);
+            Dimension minimumSize = new Dimension(100, 50);
+            scrollPane.setMinimumSize(minimumSize);
+
+        }
+
+        public void setProductItem(Product product) {
+
+            try {
+                productIcon.setIcon(getImageIcon(product.getAttachedImage()));
+                productName.setText(product.getName());
+                table.setModel(new ProductDetailModel(product));
+             } catch (RemoteException e) {
+                String message;
+                if(null != e.getCause()) message = e.getCause().getMessage();
+                else message = e.getMessage();
+                JOptionPane.showMessageDialog(this, message,
+                        "Exception", JOptionPane.ERROR_MESSAGE);
+                e.printStackTrace();
+            }
+
+        }
+    }
+
+    class ProductDetailModel extends AbstractTableModel {
+        private static final long serialVersionUID = 1L;
+
+        private String[] columnNames = { "itemId", "Product Id", "atr1",
+                "attr2", "attr3", "attr4", "attr5", "List Price", "Quantity",
+                "Supplier Id", "Unit Cost", "Status", "Add to Stock" };
+
+        Item[] items = null;
+
+        public ProductDetailModel(Product product) throws RemoteException {
+            items = store.listItems(product.getProductId());
+        }
+
+        public int getColumnCount() {
+            return columnNames.length;
+        }
+
+        public int getRowCount() {
+            if (items == null)
+                return 0;
+            return items.length;
+        }
+
+        public String getColumnName(int col) {
+            return columnNames[col];
+        }
+
+        public Object getValueAt(int row, int col) {
+            Item curItem = items[row];
+            if (col == 0)
+                return curItem.getItemId();
+            else if (col == 1)
+                return curItem.getProductId();
+            else if (col == 2)
+                return curItem.getAttr1();
+            else if (col == 3)
+                return curItem.getAttr2();
+            else if (col == 4)
+                return curItem.getAttr3();
+            else if (col == 5)
+                return curItem.getAttr4();
+            else if (col == 6)
+                return curItem.getAttr5();
+            else if (col == 7)
+                return curItem.getListPrice();
+            else if (col == 8)
+                return "" + curItem.getQty();
+            else if (col == 9)
+                return "" + curItem.getSupplier();
+            else if (col == 10)
+                return curItem.getUnitCost();
+            else if (col == 11)
+                return curItem.getStatus();
+            else if (col == 12)
+                return "";
+            else
+                return "Unknown Column";
+        }
+
+        public boolean isCellEditable(int row, int col) {
+            if (col == 7 || col == 12)
+                return true;
+            else
+                return false;
+        }
+
+        public void setValueAt(Object value, int row, int col) {
+            if (DEBUG) {
+                System.out.println("Setting value at " + row + "," + col
+                        + " to " + value + " (an instance of "
+                        + value.getClass() + ")");
+            }
+
+            String itemId = items[row].getItemId();
+            String productId = items[row].getProductId();
+            try {
+                if (col == 7)
+                    store.setItemListPrice(itemId, new BigDecimal(
+                            (String) value));
+                else if (col == 12)
+                    store.restockItem(itemId, Integer.parseInt((String) value));
+
+                items = store.listItems(productId); // refresh model
+            } catch (InvalidIdentifierException e) {
+                  e.printStackTrace();
+            } catch (NumberFormatException e) {
+                 e.printStackTrace();
+            } catch (RemoteException e) {
+                 e.printStackTrace();
+            }
+
+        }
+    }
+
+    private class StoreProductInfo {
+        public String toString() {
+            return "Products";
+        }
+    }
+
+    private class StoreInfo {
+        public String toString() {
+            return "Store";
+        }
+    }
+
+    private class ProductCategoryInfo {
+        Category category;
+
+        /**
+         * @return Returns the catagory.
+         */
+        public Category getCategory() {
+            return category;
+        }
+
+        /**
+         * @param catagory
+         */
+        public ProductCategoryInfo(Category category) {
+            super();
+            this.category = category;
+            System.out
+                    .println("build category info for: " + category.getName());
+        }
+
+        public String toString() {
+            return category.getName();
+        }
+    }
+
+    private class ProductInfo {
+        Product product;
+
+        /**
+         * @return Returns the product.
+         */
+        public Product getProduct() {
+            return product;
+        }
+
+        /**
+         * @param product
+         */
+        public ProductInfo(Product product) {
+            super();
+            this.product = product;
+        }
+
+        public String toString() {
+            return product.getName();
+        }
+    }
+
+
+    private class MyRenderer extends DefaultTreeCellRenderer {
+        private static final long serialVersionUID = 1L;
+
+        Icon tutorialIcon;
+
+        public MyRenderer() {
+
+        }
+
+        public Component getTreeCellRendererComponent(JTree tree, Object value,
+                boolean sel, boolean expanded, boolean leaf, int row,
+                boolean hasFocus) {
+
+            super.getTreeCellRendererComponent(tree, value, sel, expanded,
+                    leaf, row, hasFocus);
+
+            setIcon(getNodeIcon(value));
+            setToolTipText(getNodeToolTip(value));
+            setFont(new Font("serif", Font.BOLD, 15));
+            return this;
+        }
+
+        /**
+         * @param value
+         * @return
+         */
+        private String getNodeToolTip(Object value) {
+            Object nodeInfo = ((DefaultMutableTreeNode) value).getUserObject();
+            if (StoreProductInfo.class.isInstance(nodeInfo)) {
+                return "Click to get list of Products";
+            } else if (StoreInfo.class.isInstance(nodeInfo)) {
+                return "Click to get store information";
+            } else if (ProductCategoryInfo.class.isInstance(nodeInfo)) {
+                return ((ProductCategoryInfo) nodeInfo).getCategory()
+                        .getDescription();
+            } else if (ProductInfo.class.isInstance(nodeInfo)) {
+                return ((ProductInfo) nodeInfo).getProduct().getDescription();
+
+            } else {
+                return null;
+            }
+        }
+
+        /**
+         * @param value
+         * @return
+         */
+
+        private Icon getNodeIcon(Object value) {
+
+            Object nodeInfo = ((DefaultMutableTreeNode) value).getUserObject();
+            if (StoreProductInfo.class.isInstance(nodeInfo)) {
+                return null;
+            } else if (ProductCategoryInfo.class.isInstance(nodeInfo)) {
+                 return getImageIcon(((ProductCategoryInfo) nodeInfo).getCategory().getAttachedImage());
+
+            } else if (ProductInfo.class.isInstance(nodeInfo)) {
+                return new ImageIcon(scaleToIcon(((ProductInfo) nodeInfo)
+                        .getProduct().getAttachedImage()));
+            } else {
+                return null;
+            }
+        }
+
+
+    }
+}

Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/server-config.wsdd
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/server-config.wsdd?rev=170107&r1=170106&r2=170107&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/server-config.wsdd (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/server-config.wsdd Fri May 13 16:30:30 2005
@@ -1,48 +1,48 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
- <globalConfiguration>
-  <parameter name="adminPassword" value="admin"/>
-  <parameter name="disablePrettyXML" value="true"/>
-  <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
-  <parameter name="sendXsiTypes" value="true"/>
-  <parameter name="sendXMLDeclaration" value="true"/>
-  <requestFlow>
-    <handler type="java:org.apache.beehive.wsm.axis.util.DebugPrintMessageHandler">
-   </handler>
-  <handler type="java:org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler">
-    <parameter name="scope" value="session"/>
-   </handler>
-  <handler type="java:org.apache.axis.handlers.JWSHandler">
-    <parameter name="scope" value="session"/>
-   </handler>
-  </requestFlow>
- </globalConfiguration>
- <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
- <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
- <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
- <service name="AdminService" provider="java:MSG">
-  <parameter name="allowedMethods" value="AdminService"/>
-  <parameter name="enableRemoteAdmin" value="false"/>
-  <parameter name="className" value="org.apache.axis.utils.Admin"/>
-  <namespace>http://xml.apache.org/axis/wsdd/</namespace>
- </service>
- <service name="Version" provider="java:RPC">
-  <parameter name="allowedMethods" value="getVersion"/>
-  <parameter name="className" value="org.apache.axis.Version"/>
- </service>
- <transport name="http">
-  <requestFlow>
-   <handler type="URLMapper"/>
-   <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
-  </requestFlow>
-  <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
-  <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
-  <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
- </transport>
- <transport name="local">
-  <responseFlow>
-   <handler type="LocalResponder"/>
-  </responseFlow>
- </transport>
-</deployment>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
+ <globalConfiguration>
+  <parameter name="adminPassword" value="admin"/>
+  <parameter name="disablePrettyXML" value="true"/>
+  <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
+  <parameter name="sendXsiTypes" value="true"/>
+  <parameter name="sendXMLDeclaration" value="true"/>
+  <requestFlow>
+    <handler type="java:org.apache.beehive.wsm.axis.util.DebugPrintMessageHandler">
+   </handler>
+  <handler type="java:org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler">
+    <parameter name="scope" value="session"/>
+   </handler>
+  <handler type="java:org.apache.axis.handlers.JWSHandler">
+    <parameter name="scope" value="session"/>
+   </handler>
+  </requestFlow>
+ </globalConfiguration>
+ <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
+ <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
+ <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
+ <service name="AdminService" provider="java:MSG">
+  <parameter name="allowedMethods" value="AdminService"/>
+  <parameter name="enableRemoteAdmin" value="false"/>
+  <parameter name="className" value="org.apache.axis.utils.Admin"/>
+  <namespace>http://xml.apache.org/axis/wsdd/</namespace>
+ </service>
+ <service name="Version" provider="java:RPC">
+  <parameter name="allowedMethods" value="getVersion"/>
+  <parameter name="className" value="org.apache.axis.Version"/>
+ </service>
+ <transport name="http">
+  <requestFlow>
+   <handler type="URLMapper"/>
+   <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
+  </requestFlow>
+  <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
+  <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
+  <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
+ </transport>
+ <transport name="local">
+  <responseFlow>
+   <handler type="LocalResponder"/>
+  </responseFlow>
+ </transport>
+</deployment>
+

Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/DocumentLiteralBareSample.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/DocumentLiteralBareSample.java?rev=170107&r1=170106&r2=170107&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/DocumentLiteralBareSample.java (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/DocumentLiteralBareSample.java Fri May 13 16:30:30 2005
@@ -1,133 +1,133 @@
-package web.complex;
-
-/*
- * Copyright 2004, 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$Factory
- */
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.apache.beehive.sample.Address;
-import org.apache.beehive.sample.AddressHolder;
-import org.apache.beehive.sample.AddressException;
-import org.apache.beehive.sample.Phone;
-import org.apache.beehive.sample.StateType;
-
-/**
- * This class illustrates the use of complex types with style/use "DOC/LITERAL" (bare).
- */
-@WebService
-@SOAPBinding(
-    style=SOAPBinding.Style.DOCUMENT,
-    use=SOAPBinding.Use.LITERAL,
-    parameterStyle=SOAPBinding.ParameterStyle.BARE
-)        
-public class DocumentLiteralBareSample {
-
-    /**
-     * Returns a complex (address) object that was passed in as IN parameter in the message body.
-     * @param address The complex object to be returned.
-     * @return The complex object that was passed in as an IN parameter.
-     */
-    @WebMethod
-    @WebResult(name="ReturnAddressFromBodyResult")
-    public Address returnAddressFromBody(@WebParam(name="in_param_body", mode=WebParam.Mode.IN) Address address) {
-        return address;
-    }
-
-    /**
-     * Returns a complex (address) object that was passed in as IN parameter in the message header.
-     * @param object The complex object to be modified.
-     * @return The complex object that was passed in as an IN parameter.
-     */
-    @WebMethod
-    @WebResult(name="ReturnAddressFromHeaderResult")
-    public Address returnAddressFromHeader(@WebParam(name="in_param_header", header=true, mode=WebParam.Mode.IN) Address address) {
-        return address;
-    }
-
-    /**
-     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message body.
-     * @param addressHolder The holder of the complex object to be returned.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ReturnCreateAddressInBodyResult")
-    public int createAddressInBody(@WebParam(name="out_param_body", mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
-        StateType state = new StateType("WA");
-        Phone phoneNumber = new Phone(425, "555", "1234");
-        Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
-        addressHolder.value = address;
-        return 0;
-    }
-
-    /**
-     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message header.
-     * @param addressHolder The holder of the complex object to be returned.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ReturnCreateAddressInHeaderResult")
-    public int createAddressInHeader(@WebParam(name="out_param_header", header=true, mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
-        StateType state = new StateType("WA");
-        Phone phoneNumber = new Phone(425, "555", "1234");
-        Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
-        addressHolder.value = address;
-        return 0;
-    }
-
-    /**
-     * Modifies a complex (address) INOUT parameter that is encoded in the message body.
-     * @param addressHolder The object to be modified.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ChangeAddressInBodyResult")
-    public int changeAddressInBody(@WebParam(name="inout_param_body", mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
-        Address address = addressHolder.value;
-        address.setZip(address.getZip() + 1);
-        return 0;
-    }
-
-    /**
-     * Modifies a complex (address) INOUT parameter that is encoded in the message header.
-     * @param addressHolder The object to be modified.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ChangeAddressInHeaderResult")
-    public int changeAddressInHeader(@WebParam(name="inout_param_header", header=true, mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
-        Address address = addressHolder.value;
-        address.setZip(address.getZip() + 1);
-        return 0;
-    }
-
-    /**
-     * Throws an AddressException.
-     * @param value Ignored (only printed in message).
-     * @return An operational result (never returned).
-     * @throws AddressException Always thrown.
-     */
-    @WebMethod
-    @WebResult(name="ThrowAddressExceptionResult")
-    public int throwAddressException(@WebParam(name="in_param") int value) throws AddressException {
-        throw new AddressException("This is a sample message for:\n\tAddressException; input value=\"" + value + "\"");
-    }
+package web.complex;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$Factory
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.apache.beehive.sample.Address;
+import org.apache.beehive.sample.AddressHolder;
+import org.apache.beehive.sample.AddressException;
+import org.apache.beehive.sample.Phone;
+import org.apache.beehive.sample.StateType;
+
+/**
+ * This class illustrates the use of complex types with style/use "DOC/LITERAL" (bare).
+ */
+@WebService
+@SOAPBinding(
+    style=SOAPBinding.Style.DOCUMENT,
+    use=SOAPBinding.Use.LITERAL,
+    parameterStyle=SOAPBinding.ParameterStyle.BARE
+)        
+public class DocumentLiteralBareSample {
+
+    /**
+     * Returns a complex (address) object that was passed in as IN parameter in the message body.
+     * @param address The complex object to be returned.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnAddressFromBodyResult")
+    public Address returnAddressFromBody(@WebParam(name="in_param_body", mode=WebParam.Mode.IN) Address address) {
+        return address;
+    }
+
+    /**
+     * Returns a complex (address) object that was passed in as IN parameter in the message header.
+     * @param object The complex object to be modified.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnAddressFromHeaderResult")
+    public Address returnAddressFromHeader(@WebParam(name="in_param_header", header=true, mode=WebParam.Mode.IN) Address address) {
+        return address;
+    }
+
+    /**
+     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message body.
+     * @param addressHolder The holder of the complex object to be returned.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateAddressInBodyResult")
+    public int createAddressInBody(@WebParam(name="out_param_body", mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
+        StateType state = new StateType("WA");
+        Phone phoneNumber = new Phone(425, "555", "1234");
+        Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
+        addressHolder.value = address;
+        return 0;
+    }
+
+    /**
+     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message header.
+     * @param addressHolder The holder of the complex object to be returned.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateAddressInHeaderResult")
+    public int createAddressInHeader(@WebParam(name="out_param_header", header=true, mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
+        StateType state = new StateType("WA");
+        Phone phoneNumber = new Phone(425, "555", "1234");
+        Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
+        addressHolder.value = address;
+        return 0;
+    }
+
+    /**
+     * Modifies a complex (address) INOUT parameter that is encoded in the message body.
+     * @param addressHolder The object to be modified.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ChangeAddressInBodyResult")
+    public int changeAddressInBody(@WebParam(name="inout_param_body", mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
+        Address address = addressHolder.value;
+        address.setZip(address.getZip() + 1);
+        return 0;
+    }
+
+    /**
+     * Modifies a complex (address) INOUT parameter that is encoded in the message header.
+     * @param addressHolder The object to be modified.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ChangeAddressInHeaderResult")
+    public int changeAddressInHeader(@WebParam(name="inout_param_header", header=true, mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
+        Address address = addressHolder.value;
+        address.setZip(address.getZip() + 1);
+        return 0;
+    }
+
+    /**
+     * Throws an AddressException.
+     * @param value Ignored (only printed in message).
+     * @return An operational result (never returned).
+     * @throws AddressException Always thrown.
+     */
+    @WebMethod
+    @WebResult(name="ThrowAddressExceptionResult")
+    public int throwAddressException(@WebParam(name="in_param") int value) throws AddressException {
+        throw new AddressException("This is a sample message for:\n\tAddressException; input value=\"" + value + "\"");
+    }
 }

Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/RpcEncodedSample.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/RpcEncodedSample.java?rev=170107&r1=170106&r2=170107&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/RpcEncodedSample.java (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/RpcEncodedSample.java Fri May 13 16:30:30 2005
@@ -1,133 +1,133 @@
-package web.complex;
-
-/*
- * Copyright 2004, 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$Factory
- */
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.apache.beehive.sample.Address;
-import org.apache.beehive.sample.AddressHolder;
-import org.apache.beehive.sample.AddressException;
-import org.apache.beehive.sample.Phone;
-import org.apache.beehive.sample.StateType;
-
-/**
- * This class illustrates the use of complex types with style/use "RPC/ENCODED".
- */
-@WebService( targetNamespace="http://beehive.apache.org/web/webservice/rpc-enc-examples")
-
-@SOAPBinding(
-    style=SOAPBinding.Style.RPC,
-    use=SOAPBinding.Use.ENCODED
-)        
-public class RpcEncodedSample {
-
-    /**
-     * Returns a complex (address) object that was passed in as IN parameter in the message body.
-     * @param address The complex object to be returned.
-     * @return The complex object that was passed in as an IN parameter.
-     */
-    @WebMethod
-    @WebResult(name="ReturnAddressFromBodyResult")
-    public Address returnAddressFromBody(@WebParam(name="in_param_body", mode=WebParam.Mode.IN) Address address) {
-        return address;
-    }
-
-    /**
-     * Returns a complex (address) object that was passed in as IN parameter in the message header.
-     * @param object The complex object to be modified.
-     * @return The complex object that was passed in as an IN parameter.
-     */
-    @WebMethod
-    @WebResult(name="ReturnAddressFromHeaderResult")
-    public Address returnAddressFromHeader(@WebParam(name="in_param_header", header=true, mode=WebParam.Mode.IN) Address address) {
-        return address;
-    }
-
-    /**
-     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message body.
-     * @param addressHolder The holder of the complex object to be returned.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ReturnCreateAddressInBodyResult")
-    public int createAddressInBody(@WebParam(name="out_param_body", mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
-        StateType state = new StateType("CO");
-        Phone phoneNumber = new Phone(425, "555", "1234");
-        Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
-        addressHolder.value = address;
-        return 0;
-    }
-
-    /**
-     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message header.
-     * @param addressHolder The holder of the complex object to be returned.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ReturnCreateAddressInHeaderResult")
-    public int createAddressInHeader(@WebParam(name="out_param_header", header=true, mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
-        StateType state = new StateType("CA");
-        Phone phoneNumber = new Phone(714, "555", "1234");
-        Address address = new Address(1, "some street", "Los Angeles", state, 90210, phoneNumber);
-        addressHolder.value = address;
-        return 0;
-    }
-
-    /**
-     * Modifies a complex (address) INOUT parameter that is encoded in the message body.
-     * @param addressHolder The object to be modified.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ChangeAddressInBodyResult")
-    public int changeAddressInBody(@WebParam(name="inout_param_body", mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
-        Address address = addressHolder.value;
-        address.setZip(address.getZip() + 1);
-        return 0;
-    }
-
-    /**
-     * Modifies a complex (address) INOUT parameter that is encoded in the message header.
-     * @param addressHolder The object to be modified.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ChangeAddressInHeaderResult")
-    public int changeAddressInHeader(@WebParam(name="inout_param_header", header=true, mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
-        Address address = addressHolder.value;
-        address.setZip(address.getZip() + 1);
-        return 0;
-    }
-
-    /**
-     * Throws an AddressException.
-     * @param value Ignored (only printed in message).
-     * @return An operational result (never returned).
-     * @throws AddressException Always thrown.
-     */
-    @WebMethod
-    @WebResult(name="ThrowAddressExceptionResult")
-    public int throwAddressException(@WebParam(name="in_param") int value) throws AddressException {
-        throw new AddressException("This is a sample message for:\n\tAddressException; input value=\"" + value + "\"");
-    }
+package web.complex;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$Factory
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.apache.beehive.sample.Address;
+import org.apache.beehive.sample.AddressHolder;
+import org.apache.beehive.sample.AddressException;
+import org.apache.beehive.sample.Phone;
+import org.apache.beehive.sample.StateType;
+
+/**
+ * This class illustrates the use of complex types with style/use "RPC/ENCODED".
+ */
+@WebService( targetNamespace="http://beehive.apache.org/web/webservice/rpc-enc-examples")
+
+@SOAPBinding(
+    style=SOAPBinding.Style.RPC,
+    use=SOAPBinding.Use.ENCODED
+)        
+public class RpcEncodedSample {
+
+    /**
+     * Returns a complex (address) object that was passed in as IN parameter in the message body.
+     * @param address The complex object to be returned.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnAddressFromBodyResult")
+    public Address returnAddressFromBody(@WebParam(name="in_param_body", mode=WebParam.Mode.IN) Address address) {
+        return address;
+    }
+
+    /**
+     * Returns a complex (address) object that was passed in as IN parameter in the message header.
+     * @param object The complex object to be modified.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnAddressFromHeaderResult")
+    public Address returnAddressFromHeader(@WebParam(name="in_param_header", header=true, mode=WebParam.Mode.IN) Address address) {
+        return address;
+    }
+
+    /**
+     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message body.
+     * @param addressHolder The holder of the complex object to be returned.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateAddressInBodyResult")
+    public int createAddressInBody(@WebParam(name="out_param_body", mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
+        StateType state = new StateType("CO");
+        Phone phoneNumber = new Phone(425, "555", "1234");
+        Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
+        addressHolder.value = address;
+        return 0;
+    }
+
+    /**
+     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message header.
+     * @param addressHolder The holder of the complex object to be returned.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateAddressInHeaderResult")
+    public int createAddressInHeader(@WebParam(name="out_param_header", header=true, mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
+        StateType state = new StateType("CA");
+        Phone phoneNumber = new Phone(714, "555", "1234");
+        Address address = new Address(1, "some street", "Los Angeles", state, 90210, phoneNumber);
+        addressHolder.value = address;
+        return 0;
+    }
+
+    /**
+     * Modifies a complex (address) INOUT parameter that is encoded in the message body.
+     * @param addressHolder The object to be modified.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ChangeAddressInBodyResult")
+    public int changeAddressInBody(@WebParam(name="inout_param_body", mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
+        Address address = addressHolder.value;
+        address.setZip(address.getZip() + 1);
+        return 0;
+    }
+
+    /**
+     * Modifies a complex (address) INOUT parameter that is encoded in the message header.
+     * @param addressHolder The object to be modified.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ChangeAddressInHeaderResult")
+    public int changeAddressInHeader(@WebParam(name="inout_param_header", header=true, mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
+        Address address = addressHolder.value;
+        address.setZip(address.getZip() + 1);
+        return 0;
+    }
+
+    /**
+     * Throws an AddressException.
+     * @param value Ignored (only printed in message).
+     * @return An operational result (never returned).
+     * @throws AddressException Always thrown.
+     */
+    @WebMethod
+    @WebResult(name="ThrowAddressExceptionResult")
+    public int throwAddressException(@WebParam(name="in_param") int value) throws AddressException {
+        throw new AddressException("This is a sample message for:\n\tAddressException; input value=\"" + value + "\"");
+    }
 }

Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/RpcLiteralSample.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/RpcLiteralSample.java?rev=170107&r1=170106&r2=170107&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/RpcLiteralSample.java (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/complex/RpcLiteralSample.java Fri May 13 16:30:30 2005
@@ -1,133 +1,133 @@
-package web.complex;
-
-/*
- * Copyright 2004, 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$Factory
- */
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.apache.beehive.sample.Address;
-import org.apache.beehive.sample.AddressHolder;
-import org.apache.beehive.sample.AddressException;
-import org.apache.beehive.sample.Phone;
-import org.apache.beehive.sample.StateType;
-
-/**
- * This class illustrates the use of complex types with style/use "RPC/LITERAL".
- */
-@WebService( targetNamespace="http://beehive.apache.org/web/webservice/rpc-examples")
-
-@SOAPBinding(
-    style=SOAPBinding.Style.RPC,
-    use=SOAPBinding.Use.LITERAL
-)        
-public class RpcLiteralSample {
-
-    /**
-     * Returns a complex (address) object that was passed in as IN parameter in the message body.
-     * @param address The complex object to be returned.
-     * @return The complex object that was passed in as an IN parameter.
-     */
-    @WebMethod
-    @WebResult(name="ReturnAddressFromBodyResult")
-    public Address returnAddressFromBody(@WebParam(name="in_param_body", mode=WebParam.Mode.IN) Address address) {
-        return address;
-    }
-
-    /**
-     * Returns a complex (address) object that was passed in as IN parameter in the message header.
-     * @param object The complex object to be modified.
-     * @return The complex object that was passed in as an IN parameter.
-     */
-    @WebMethod
-    @WebResult(name="ReturnAddressFromHeaderResult")
-    public Address returnAddressFromHeader(@WebParam(name="in_param_header", header=true, mode=WebParam.Mode.IN) Address address) {
-        return address;
-    }
-
-    /**
-     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message body.
-     * @param addressHolder The holder of the complex object to be returned.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ReturnCreateAddressInBodyResult")
-    public int createAddressInBody(@WebParam(name="out_param_body", mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
-        StateType state = new StateType("PA");
-        Phone phoneNumber = new Phone(425, "555", "1234");
-        Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
-        addressHolder.value = address;
-        return 0;
-    }
-
-    /**
-     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message header.
-     * @param addressHolder The holder of the complex object to be returned.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ReturnCreateAddressInHeaderResult")
-    public int createAddressInHeader(@WebParam(name="out_param_header", header=true, mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
-        StateType state = new StateType("CA");
-        Phone phoneNumber = new Phone(714, "555", "1234");
-        Address address = new Address(1, "some street", "Los Angeles", state, 90210, phoneNumber);
-        addressHolder.value = address;
-        return 0;
-    }
-
-    /**
-     * Modifies a complex (address) INOUT parameter that is encoded in the message body.
-     * @param addressHolder The object to be modified.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ChangeAddressInBodyResult")
-    public int changeAddressInBody(@WebParam(name="inout_param_body", mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
-        Address address = addressHolder.value;
-        address.setZip(address.getZip() + 1);
-        return 0;
-    }
-
-    /**
-     * Modifies a complex (address) INOUT parameter that is encoded in the message header.
-     * @param addressHolder The object to be modified.
-     * @return An operational result (always 0).
-     */
-    @WebMethod
-    @WebResult(name="ChangeAddressInHeaderResult")
-    public int changeAddressInHeader(@WebParam(name="inout_param_header", header=true, mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
-        Address address = addressHolder.value;
-        address.setZip(address.getZip() + 1);
-        return 0;
-    }
-
-    /**
-     * Throws an AddressException.
-     * @param value Ignored (only printed in message).
-     * @return An operational result (never returned).
-     * @throws AddressException Always thrown.
-     */
-    @WebMethod
-    @WebResult(name="ThrowAddressExceptionResult")
-    public int throwAddressException(@WebParam(name="in_param") int value) throws AddressException {
-        throw new AddressException("This is a sample message for:\n\tAddressException; input value=\"" + value + "\"");
-    }
+package web.complex;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$Factory
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.apache.beehive.sample.Address;
+import org.apache.beehive.sample.AddressHolder;
+import org.apache.beehive.sample.AddressException;
+import org.apache.beehive.sample.Phone;
+import org.apache.beehive.sample.StateType;
+
+/**
+ * This class illustrates the use of complex types with style/use "RPC/LITERAL".
+ */
+@WebService( targetNamespace="http://beehive.apache.org/web/webservice/rpc-examples")
+
+@SOAPBinding(
+    style=SOAPBinding.Style.RPC,
+    use=SOAPBinding.Use.LITERAL
+)        
+public class RpcLiteralSample {
+
+    /**
+     * Returns a complex (address) object that was passed in as IN parameter in the message body.
+     * @param address The complex object to be returned.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnAddressFromBodyResult")
+    public Address returnAddressFromBody(@WebParam(name="in_param_body", mode=WebParam.Mode.IN) Address address) {
+        return address;
+    }
+
+    /**
+     * Returns a complex (address) object that was passed in as IN parameter in the message header.
+     * @param object The complex object to be modified.
+     * @return The complex object that was passed in as an IN parameter.
+     */
+    @WebMethod
+    @WebResult(name="ReturnAddressFromHeaderResult")
+    public Address returnAddressFromHeader(@WebParam(name="in_param_header", header=true, mode=WebParam.Mode.IN) Address address) {
+        return address;
+    }
+
+    /**
+     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message body.
+     * @param addressHolder The holder of the complex object to be returned.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateAddressInBodyResult")
+    public int createAddressInBody(@WebParam(name="out_param_body", mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
+        StateType state = new StateType("PA");
+        Phone phoneNumber = new Phone(425, "555", "1234");
+        Address address = new Address(10230, "NE Points Drive", "Kirkland", state, 98008, phoneNumber);
+        addressHolder.value = address;
+        return 0;
+    }
+
+    /**
+     * Creates a new complex (address) object and returns that object as an OUT parameter that is encoded in the message header.
+     * @param addressHolder The holder of the complex object to be returned.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ReturnCreateAddressInHeaderResult")
+    public int createAddressInHeader(@WebParam(name="out_param_header", header=true, mode=WebParam.Mode.OUT) AddressHolder addressHolder) {
+        StateType state = new StateType("CA");
+        Phone phoneNumber = new Phone(714, "555", "1234");
+        Address address = new Address(1, "some street", "Los Angeles", state, 90210, phoneNumber);
+        addressHolder.value = address;
+        return 0;
+    }
+
+    /**
+     * Modifies a complex (address) INOUT parameter that is encoded in the message body.
+     * @param addressHolder The object to be modified.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ChangeAddressInBodyResult")
+    public int changeAddressInBody(@WebParam(name="inout_param_body", mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
+        Address address = addressHolder.value;
+        address.setZip(address.getZip() + 1);
+        return 0;
+    }
+
+    /**
+     * Modifies a complex (address) INOUT parameter that is encoded in the message header.
+     * @param addressHolder The object to be modified.
+     * @return An operational result (always 0).
+     */
+    @WebMethod
+    @WebResult(name="ChangeAddressInHeaderResult")
+    public int changeAddressInHeader(@WebParam(name="inout_param_header", header=true, mode=WebParam.Mode.INOUT) AddressHolder addressHolder) {
+        Address address = addressHolder.value;
+        address.setZip(address.getZip() + 1);
+        return 0;
+    }
+
+    /**
+     * Throws an AddressException.
+     * @param value Ignored (only printed in message).
+     * @return An operational result (never returned).
+     * @throws AddressException Always thrown.
+     */
+    @WebMethod
+    @WebResult(name="ThrowAddressExceptionResult")
+    public int throwAddressException(@WebParam(name="in_param") int value) throws AddressException {
+        throw new AddressException("This is a sample message for:\n\tAddressException; input value=\"" + value + "\"");
+    }
 }

Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/handlerchain/HandlerChainSample.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/handlerchain/HandlerChainSample.java?rev=170107&r1=170106&r2=170107&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/handlerchain/HandlerChainSample.java (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/handlerchain/HandlerChainSample.java Fri May 13 16:30:30 2005
@@ -1,33 +1,33 @@
-package web.handlerchain;
-
-/*
- * Copyright 2004, 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$Factory
- */
-
-import javax.jws.HandlerChain;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-
-@WebService
-@HandlerChain(file="HandlerConfig.xml", name="HandlerChain")
-public class HandlerChainSample {
-
-    @WebMethod
-    public String sayHello(String name) {
-        return "Hello, " + name + "!";
-    }
-}
+package web.handlerchain;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$Factory
+ */
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService
+@HandlerChain(file="HandlerConfig.xml", name="HandlerChain")
+public class HandlerChainSample {
+
+    @WebMethod
+    public String sayHello(String name) {
+        return "Hello, " + name + "!";
+    }
+}

Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/handlerchain/HandlerConfig.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/handlerchain/HandlerConfig.xml?rev=170107&r1=170106&r2=170107&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/handlerchain/HandlerConfig.xml (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/handlerchain/HandlerConfig.xml Fri May 13 16:30:30 2005
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<handler-config
-    xmlns="http://beehive.apache.org/wsm/web"
-    xmlns:local="http://beehive.apache.org/wsm/local">
-  <handler-chain>
-    <handler-chain-name>HandlerChain</handler-chain-name>
-      <handler>
-        <local:handler-name>message-handler</local:handler-name>
-        <local:handler-class>org.apache.beehive.sample.MessageHandler</local:handler-class>
-        <init-param>
-          <param-name>original</param-name>
-          <param-name>original</param-name>
-        </init-param>
-        <init-param>
-          <param-name>modified</param-name>
-          <param-name>oRiGiNaL</param-name>
-        </init-param>
-     </handler>
-   </handler-chain>
-</handler-config>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<handler-config
+    xmlns="http://beehive.apache.org/wsm/web"
+    xmlns:local="http://beehive.apache.org/wsm/local">
+  <handler-chain>
+    <handler-chain-name>HandlerChain</handler-chain-name>
+      <handler>
+        <local:handler-name>message-handler</local:handler-name>
+        <local:handler-class>org.apache.beehive.sample.MessageHandler</local:handler-class>
+        <init-param>
+          <param-name>original</param-name>
+          <param-name>original</param-name>
+        </init-param>
+        <init-param>
+          <param-name>modified</param-name>
+          <param-name>oRiGiNaL</param-name>
+        </init-param>
+     </handler>
+   </handler-chain>
+</handler-config>
+

Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/header/StockQuoteImpl.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/header/StockQuoteImpl.java?rev=170107&r1=170106&r2=170107&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/header/StockQuoteImpl.java (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/header/StockQuoteImpl.java Fri May 13 16:30:30 2005
@@ -1,68 +1,68 @@
-package web.header;
-
-/*
- * Copyright 2004, 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$Factory
- */
-
-/*  
- * Note:  This sample was developed based on the example in the article:
- * http://www-128.ibm.com/developerworks/webservices/library/ws-tip-extend/
- */
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.InitParam;
-import javax.jws.soap.SOAPMessageHandler;
-import javax.jws.soap.SOAPMessageHandlers;
-
-
-/**
- * Serve up stock quotes.
- */
-@WebService(targetNamespace="http://beehive.apache.org/wsm/web/header_sample")
-@SOAPMessageHandlers({
-  @SOAPMessageHandler(
-    className = "web.header.ServiceSignHandler",
-    roles = {"simple-security"},
-        initParams = {
-      @InitParam(name=SignHandler.SIGNERS_NAME_PROPERTY
-      , value="beehive")
-      }
-  )
-})
-public class StockQuoteImpl implements StockQuote {
-
-    /**
-     * Return a "quote" (not-live) for stock symbol.
-     */
-    @WebMethod
-    public float getQuote(String symbol)  {
-        double quote = 0.0;
-        System.out.println("Get quote for" + symbol);
-
-        // Quote is function of the symbol characters
-        for (int i = 0; i < symbol.length(); i++) {
-            int c = symbol.charAt(i) & 0x1F;
-            int digit = c % 10;
-
-            quote = (quote * 10.0) + digit;
-        }
-
-        // One decimal place.
-        return (float)(quote / 10.0);
-    }
-}
+package web.header;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$Factory
+ */
+
+/*  
+ * Note:  This sample was developed based on the example in the article:
+ * http://www-128.ibm.com/developerworks/webservices/library/ws-tip-extend/
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.InitParam;
+import javax.jws.soap.SOAPMessageHandler;
+import javax.jws.soap.SOAPMessageHandlers;
+
+
+/**
+ * Serve up stock quotes.
+ */
+@WebService(targetNamespace="http://beehive.apache.org/wsm/web/header_sample")
+@SOAPMessageHandlers({
+  @SOAPMessageHandler(
+    className = "web.header.ServiceSignHandler",
+    roles = {"simple-security"},
+        initParams = {
+      @InitParam(name=SignHandler.SIGNERS_NAME_PROPERTY
+      , value="beehive")
+      }
+  )
+})
+public class StockQuoteImpl implements StockQuote {
+
+    /**
+     * Return a "quote" (not-live) for stock symbol.
+     */
+    @WebMethod
+    public float getQuote(String symbol)  {
+        double quote = 0.0;
+        System.out.println("Get quote for" + symbol);
+
+        // Quote is function of the symbol characters
+        for (int i = 0; i < symbol.length(); i++) {
+            int c = symbol.charAt(i) & 0x1F;
+            int digit = c % 10;
+
+            quote = (quote * 10.0) + digit;
+        }
+
+        // One decimal place.
+        return (float)(quote / 10.0);
+    }
+}

Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/oneway/OnewaySample.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/oneway/OnewaySample.java?rev=170107&r1=170106&r2=170107&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/oneway/OnewaySample.java (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/oneway/OnewaySample.java Fri May 13 16:30:30 2005
@@ -1,36 +1,36 @@
-package web.oneway;
-
-/*
- * Copyright 2004, 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$Factory
- */
-
-import javax.jws.Oneway;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-
-@WebService
-public class OnewaySample {
-
-    /**
-     * This method does not allow return types, exceptions, or INOUT/OUT parameters.
-     */
-    @WebMethod
-    @Oneway
-    public void sayHello(String name) {
-         System.out.println("Hello, " + name + "!");
-    }
-}
+package web.oneway;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$Factory
+ */
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService
+public class OnewaySample {
+
+    /**
+     * This method does not allow return types, exceptions, or INOUT/OUT parameters.
+     */
+    @WebMethod
+    @Oneway
+    public void sayHello(String name) {
+         System.out.println("Hello, " + name + "!");
+    }
+}

Modified: incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/soapmessagehandlers/SOAPMessageHandlersSample.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/soapmessagehandlers/SOAPMessageHandlersSample.java?rev=170107&r1=170106&r2=170107&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/soapmessagehandlers/SOAPMessageHandlersSample.java (original)
+++ incubator/beehive/trunk/samples/wsm-samples/WEB-INF/src-ws/web/soapmessagehandlers/SOAPMessageHandlersSample.java Fri May 13 16:30:30 2005
@@ -1,43 +1,43 @@
-package web.soapmessagehandlers;
-
-/*
- * Copyright 2004, 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$Factory
- */
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.InitParam;
-import javax.jws.soap.SOAPMessageHandler;
-import javax.jws.soap.SOAPMessageHandlers;
-
-@WebService(targetNamespace="http://beehive.apache.org/wsm/web")
-@SOAPMessageHandlers({
-  @SOAPMessageHandler(
-    className = "org.apache.beehive.sample.MessageHandler", 
-    initParams = {
-      @InitParam(name="original", value="original"),
-      @InitParam(name="modified", value="oRiGiNaL")
-    }
-  )
-})
-public class SOAPMessageHandlersSample {
-
-    @WebMethod
-    public String sayHello(String name) {
-        return "Hello, " + name + "!";
-    }
-}
+package web.soapmessagehandlers;
+
+/*
+ * Copyright 2004, 2005 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$Factory
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.InitParam;
+import javax.jws.soap.SOAPMessageHandler;
+import javax.jws.soap.SOAPMessageHandlers;
+
+@WebService(targetNamespace="http://beehive.apache.org/wsm/web")
+@SOAPMessageHandlers({
+  @SOAPMessageHandler(
+    className = "org.apache.beehive.sample.MessageHandler", 
+    initParams = {
+      @InitParam(name="original", value="original"),
+      @InitParam(name="modified", value="oRiGiNaL")
+    }
+  )
+})
+public class SOAPMessageHandlersSample {
+
+    @WebMethod
+    public String sayHello(String name) {
+        return "Hello, " + name + "!";
+    }
+}