imi.setServer(ManagementFactory.getPlatformMBeanServer());
imi.setEnabled(true);
imi.init();
Greeter greeter1 = new GreeterImpl();
JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
svrFactory.setAddress("http://localhost:" + SERVICE_PORT + "/Hello");
svrFactory.setServiceBean(greeter1);
svrFactory.getProperties(true).put("managed.endpoint.name", "greeter1");
svrFactory.create();
Greeter greeter2 = new GreeterImpl();
svrFactory = new JaxWsServerFactoryBean();
svrFactory.setAddress("http://localhost:" + SERVICE_PORT + "/Hello2");
svrFactory.setServiceBean(greeter2);
svrFactory.getProperties(true).put("managed.endpoint.name", "greeter2");
svrFactory.create();