1 22 package org.jboss.test.webservice.samples2; 23 24 30 public class OrderProcessBareImpl implements OrderProcessBare 31 { 32 public OrderProcess_processOrder_ResponseStruct processOrder(OrderProcess_processOrder_RequestStruct req) throws OrderException 33 { 34 OrderItem[] items = req.getArrayOfOrderItem_1(); 35 Person person = req.getPerson_2(); 36 37 if (person == null || person.getName() == null) 38 throw new OrderException("Invalid person"); 39 40 if (items == null) 41 throw new OrderException("Invalid order items"); 42 43 if (items.length > 3) 44 throw new OrderException("Too many order items"); 45 46 OrderResponse ordRes = new OrderResponse(items, "approved"); 47 48 OrderProcess_processOrder_ResponseStruct res = new OrderProcess_processOrder_ResponseStruct(ordRes); 49 return res; 50 } 51 } 52 | Popular Tags |