@SuppressWarnings("deprecation")
@Before
public void before() throws Exception {
JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
sf.setAddress("http://localhost:" + PORT + "/Echo");
sf.setDataBinding(new AegisDatabinding());
sf.setServiceBean(new Echo());
sf.getInInterceptors().add(new URIMappingInterceptor());
Server server = sf.create();
// turn off nanny in URIMappingInterceptor
server.getEndpoint()
.getService().put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
ServerFactoryBean sf2 = new ServerFactoryBean();
sf2.setAddress("http://localhost:" + PORT + "/SimpleEcho");
sf2.setDataBinding(new AegisDatabinding());
sf2.setServiceBean(new Echo());
sf2.getInInterceptors().add(new URIMappingInterceptor());
server = sf2.create();
// turn off nanny in URIMappingInterceptor
server.getEndpoint()