Order order = new Order();
order.setItem("Turkey");
order.setQuantity(1);
// Create the request message
RemoteMessage message = new RemoteMessage();
message.setService(SERVICE).setOperation("submitOrder").setContent(order);
// Invoke the service
RemoteMessage reply = invoker.invoke(message);
if (reply.isFault()) {
System.err.println("Oops ... something bad happened. " + reply.getContent());
} else {
OrderAck orderAck = (OrderAck) reply.getContent();
out.println("==================================");
out.println("Was the offer accepted? " + orderAck.isAccepted());
out.println("Description: " + orderAck.getStatusDescription());
out.println("Order ID: " + orderAck.getOrderId());
out.println("==================================");