use of org.apache.cxf.jaxrs.JAXRSInvoker in project cxf by apache.
the class JAXRSUtilsTest method invokeCustomerMethod.
private void invokeCustomerMethod(ClassResourceInfo cri, Customer customer, Server server) throws Exception {
OperationResourceInfo ori = cri.getMethodDispatcher().getOperationResourceInfo(Customer.class.getMethod("test", new Class[] {}));
JAXRSInvoker invoker = new JAXRSInvoker();
Exchange exc = new ExchangeImpl();
exc.put(Endpoint.class, server.getEndpoint());
Message inMessage = new MessageImpl();
exc.setInMessage(inMessage);
exc.put(OperationResourceInfo.class, ori);
invoker.invoke(exc, Collections.emptyList(), customer);
}
Aggregations