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