Bus bus = bf.createBus();
SpringBusFactory.setDefaultBus(bus);
Endpoint ep = createService(address);
doWork(wsdlUrl, address);
// this should revert the JVM to its original state pending gc
ep.stop();
bus.shutdown(true);
}
private void doWork(URL wsdlUrl, String address) {
SOAPService service = new SOAPService(wsdlUrl);