1 16 package org.apache.axis.wsi.scm.retailer; 17 18 import java.math.BigDecimal ; 19 20 import javax.xml.rpc.ServiceException ; 21 import javax.xml.rpc.server.ServiceLifecycle ; 22 23 import org.apache.axis.wsi.scm.retailer.catalog.CatalogItem; 24 import org.apache.axis.wsi.scm.retailer.catalog.CatalogType; 25 26 31 public class RetailerSoapBindingImpl implements org.apache.axis.wsi.scm.retailer.RetailerPortType, ServiceLifecycle { 32 33 CatalogType catalog = new CatalogType(); 34 35 public org.apache.axis.wsi.scm.retailer.catalog.CatalogType getCatalog() throws java.rmi.RemoteException { 36 return catalog; 37 } 38 39 public org.apache.axis.wsi.scm.retailer.order.PartsOrderResponseType submitOrder( 40 org.apache.axis.wsi.scm.retailer.order.PartsOrderType partsOrder, 41 org.apache.axis.wsi.scm.retailer.order.CustomerDetailsType customerDetails, 42 org.apache.axis.wsi.scm.configuration.ConfigurationType configurationHeader) 43 throws 44 java.rmi.RemoteException , 45 org.apache.axis.wsi.scm.retailer.order.InvalidProductCodeType, 46 org.apache.axis.wsi.scm.retailer.BadOrderFault, 47 org.apache.axis.wsi.scm.configuration.ConfigurationFaultType { 48 return null; 49 } 50 51 54 public void init(Object context) throws ServiceException { 55 CatalogItem[] items = new CatalogItem[10]; 56 items[0] = new CatalogItem(); 57 items[0].setName("TV, Brand1"); 58 items[0].setDescription("24in, Color, Advanced Velocity Scan Modulation, Stereo"); 59 items[0].setProductNumber(new java.math.BigInteger ("605001")); 60 items[0].setCategory("TV"); 61 items[0].setBrand("Brand1"); 62 items[0].setPrice((new BigDecimal (299.95)).setScale(2, BigDecimal.ROUND_HALF_UP)); 63 64 items[1] = new CatalogItem(); 65 items[1].setName("TV, Brand2"); 66 items[1].setDescription("32in, Super Slim Flat Panel Plasma"); 67 items[1].setProductNumber(new java.math.BigInteger ("605002")); 68 items[1].setCategory("TV"); 69 items[1].setBrand("Brand2"); 70 items[1].setPrice((new BigDecimal (1499.99)).setScale(2, BigDecimal.ROUND_HALF_UP)); 71 72 items[2] = new CatalogItem(); 73 items[2].setName("TV, Brand3"); 74 items[2].setDescription("50in, Plasma Display"); 75 items[2].setProductNumber(new java.math.BigInteger ("605003")); 76 items[2].setCategory("TV"); 77 items[2].setBrand("Brand3"); 78 items[2].setPrice(new BigDecimal ("5725.98")); 79 80 items[3] = new CatalogItem(); 81 items[3].setName("Video, Brand1"); 82 items[3].setDescription("S-VHS"); 83 items[3].setProductNumber(new java.math.BigInteger ("605004")); 84 items[3].setCategory("Video"); 85 items[3].setBrand("Brand1"); 86 items[3].setPrice(new BigDecimal ("199.95")); 87 88 items[4] = new CatalogItem(); 89 items[4].setName("Video, Brand2"); 90 items[4].setDescription("HiFi, S-VHS"); 91 items[4].setProductNumber(new java.math.BigInteger ("605005")); 92 items[4].setCategory("Video"); 93 items[4].setBrand("Brand2"); 94 items[4].setPrice(new BigDecimal ("400.00")); 95 96 items[5] = new CatalogItem(); 97 items[5].setName("Video, Brand3"); 98 items[5].setDescription("s-vhs, mindv"); 99 items[5].setProductNumber(new java.math.BigInteger ("605006")); 100 items[5].setCategory("Video"); 101 items[5].setBrand("Brand3"); 102 items[5].setPrice(new BigDecimal ("949.99")); 103 104 items[6] = new CatalogItem(); 105 items[6].setName("DVD, Brand1"); 106 items[6].setDescription("DVD-Player W/Built-In Dolby Digital Decoder"); 107 items[6].setProductNumber(new java.math.BigInteger ("605007")); 108 items[6].setCategory("DVD"); 109 items[6].setBrand("Brand1"); 110 items[6].setPrice(new BigDecimal ("100.00")); 111 112 items[7] = new CatalogItem(); 113 items[7].setName("DVD, Brand2"); 114 items[7].setDescription( 115 "Plays DVD-Video discs, CDs, stereo and multi-channel SACDs, and audio CD-Rs & CD-RWs, 27MHz/10-bit video DAC, "); 116 items[7].setProductNumber(new java.math.BigInteger ("605008")); 117 items[7].setCategory("DVD"); 118 items[7].setBrand("Brand2"); 119 items[7].setPrice(new BigDecimal ("200.00")); 120 121 items[8] = new CatalogItem(); 122 items[8].setName("DVD, Brand3"); 123 items[8].setDescription( 124 "DVD Player with SmoothSlow forward/reverse; Digital Video Enhancer; DVD/CD Text; Custom Parental Control (20-disc); Digital Cinema Sound modes"); 125 items[8].setProductNumber(new java.math.BigInteger ("605009")); 126 items[8].setCategory("DVD"); 127 items[8].setBrand("Brand3"); 128 items[8].setPrice(new BigDecimal ("250.00")); 129 130 items[9] = new CatalogItem(); 132 items[9].setName("TV, Brand4"); 133 items[9].setDescription( 134 "Designated invalid product code that is allowed to appear in the catalog, but is unable to be ordered"); 135 items[9].setProductNumber(new java.math.BigInteger ("605010")); 136 items[9].setCategory("TV"); 137 items[9].setBrand("Brand4"); 138 items[9].setPrice(new BigDecimal ("149.99")); 139 catalog.setItem(items); 140 } 141 142 145 public void destroy() { 146 } 147 148 } 149 | Popular Tags |