use of org.springframework.ws.server.endpoint.annotation.Namespaces in project webservices-axiom by apache.
the class BrokerEndpoint method order.
@PayloadRoot(namespace = "urn:broker", localPart = "Order")
@ResponsePayload
@Namespaces(@Namespace(prefix = "p", uri = "urn:broker"))
public OrderStatus order(@XPathParam("/p:Order/p:Customer") Integer customer, @RequestPayload Source payloadSource) throws UnknownCustomerException, TransformerException {
customerService.validateCustomer(customer);
StringWriter sw = new StringWriter();
transformerHelper.transform(payloadSource, new StreamResult(sw));
String payload = sw.toString();
synchronized (orderQueue) {
orderQueue.addLast(payload);
orderQueue.notify();
}
OrderStatus status = new OrderStatus();
status.setReceived(new Date());
return status;
}
Aggregations