Exchange exchange = new ExchangeImpl();
message.setExchange(exchange);
ReflectionServiceFactoryBean bean = new JaxWsServiceFactoryBean();
URL resource = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
assertNotNull(resource);
bean.setWsdlURL(resource.toString());
bean.setBus(getBus());
bean.setServiceClass(RPCLitGreeterImpl.class);
RPCLitGreeterImpl greeter = new RPCLitGreeterImpl();
BeanInvoker invoker = new BeanInvoker(greeter);
bean.setInvoker(invoker);
Service service = bean.create();
EndpointInfo endpointInfo = service.getEndpointInfo(new QName(ns, "SoapPortRPCLit"));
Endpoint endpoint = new EndpointImpl(getBus(), service, endpointInfo);
exchange.put(Service.class, service);
exchange.put(Endpoint.class, endpoint);