package org.jboss.test.webservice.samples2;
public class OrderProcessWrappedImpl implements OrderProcessWrapped
{
public OrderProcess_processOrder_ResponseStruct processOrder(OrderProcess_processOrder_RequestStruct req) throws OrderException
{
OrderItem[] items = req.getArrayOfOrderItem_1();
Person person = req.getPerson_2();
if (person == null || person.getName() == null)
throw new OrderException("Invalid person");
if (items == null)
throw new OrderException("Invalid order items");
if (items.length > 3)
throw new OrderException("Too many order items");
OrderResponse ordRes = new OrderResponse(items, "aproved");
OrderProcess_processOrder_ResponseStruct res = new OrderProcess_processOrder_ResponseStruct(ordRes);
return res;
}
}