}
private void setupForTest(boolean enableClientMTOM) throws Exception {
AegisDatabinding aegisBinding = new AegisDatabinding();
aegisBinding.setMtomEnabled(enableClientMTOM);
ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
proxyFac.setDataBinding(aegisBinding);
proxyFac.setAddress("http://localhost:" + PORT + "/mtom");
JaxWsProxyFactoryBean jaxwsFac = new JaxWsProxyFactoryBean();
jaxwsFac.setDataBinding(new AegisDatabinding());
jaxwsFac.setAddress("http://localhost:" + PORT + "/jaxWsMtom");
Map<String, Object> props = new HashMap<String, Object>();
if (enableClientMTOM) {
props.put("mtom-enabled", Boolean.TRUE);
}
proxyFac.setProperties(props);
client = (org.apache.cxf.systest.aegis.mtom.fortest.MtomTestService)
proxyFac.create(MtomTestService.class);
jaxwsClient = jaxwsFac.create(MtomTestService.class);
impl = (MtomTestImpl)applicationContext.getBean("mtomImpl");
}