1 7 package org.jboss.test.webservice.samples2; 8 9 11 17 public class OrderProcessWrappedImpl implements OrderProcessWrapped 18 { 19 public OrderProcess_processOrder_ResponseStruct processOrder(OrderProcess_processOrder_RequestStruct req) throws OrderException 20 { 21 OrderItem[] items = req.getArrayOfOrderItem_1(); 22 Person person = req.getPerson_2(); 23 24 if (person == null || person.getName() == null) 25 throw new OrderException("Invalid person"); 26 27 if (items == null) 28 throw new OrderException("Invalid order items"); 29 30 if (items.length > 3) 31 throw new OrderException("Too many order items"); 32 33 OrderResponse ordRes = new OrderResponse(items, "aproved"); 34 35 OrderProcess_processOrder_ResponseStruct res = new OrderProcess_processOrder_ResponseStruct(ordRes); 36 return res; 37 } 38 } 39 | Popular Tags |