@Test public void testSetMapOfProperties() throws Exception { Bus bus = null; try { bus = BusFactory.newInstance().createBus(); BusFactory.setThreadDefaultBus(bus); Service service = Service.create(this.getClass().getResource("META-INF/TestService.wsdl"), new QName("http: EndpointInterface port = service.getPort(new QName("http: Client client = ClientProxy.getClient(port); CXFClientConfigurer cfg = new CXFClientConfigurer(); Map<String, String> properties = new HashMap<String, String>(); properties.put("A", "1"); properties.put("B", "2"); properties.put("C", "3"); properties.put("D", "4"); properties.put("E", "5"); cfg.setConfigProperties(client, properties); assertEquals("1", client.getEndpoint().get("A")); assertEquals("2", client.getEndpoint().get("B")); assertEquals("3", client.getEndpoint().get("C")); assertEquals("4", client.getEndpoint().get("D")); assertEquals("5", client.getEndpoint().get("E")); assertEquals(5, client.getEndpoint().size()); properties = new HashMap<String, String>(); properties.put("E", "10"); properties.put("F", "20"); properties.put("G", "30"); cfg.setConfigProperties(client, properties); assertEquals("10", client.getEndpoint().get("E")); assertEquals("20", client.getEndpoint().get("F")); assertEquals("30", client.getEndpoint().get("G")); assertEquals(7, client.getEndpoint().size()); } finally { if (bus != null) { bus.shutdown(true); } } }
@Override public void setConfigProperties(Object client, String configFile, String configName) { Class<?> clazz = !(client instanceof Dispatch) ? client.getClass() : null; ClientConfig config = readConfig(configFile, configName, clazz, (BindingProvider) client); setConfigProperties(client, config); }
CXFClientConfigurer extends ConfigHelper { @Override public void setConfigProperties(Object client, String configFile, String configName) { Class<?> clazz = !(client instanceof Dispatch) ? client.getClass() : null; ClientConfig config = readConfig(configFile, configName, clazz, (BindingProvider) client); setConfigProperties(client, config); } }
CXFClientConfigurer extends ConfigHelper { @Override public void setConfigProperties(Object client, String configFile, String configName) { Class<?> clazz = !(client instanceof Dispatch) ? client.getClass() : null; ClientConfig config = readConfig(configFile, configName, clazz, (BindingProvider) client); setConfigProperties(client, config); }  }
CXFClientConfigurer extends ConfigHelper { @Override public void setConfigProperties(Object client, String configFile, String configName) { Class<?> clazz = !(client instanceof Dispatch) ? client.getClass() : null; ClientConfig config = readConfig(configFile, configName, clazz, (BindingProvider) client); setConfigProperties(client, config); }  @Override void setConfigProperties(Object client, String configFile, String configName); void setConfigProperties(Client client, Map<String, String> properties); }
CXFClientConfigurer extends ConfigHelper { @Override public void setConfigProperties(Object client, String configFile, String configName) { Class<?> clazz = !(client instanceof Dispatch) ? client.getClass() : null; ClientConfig config = readConfig(configFile, configName, clazz, (BindingProvider) client); setConfigProperties(client, config); }  @Override void setConfigProperties(Object client, String configFile, String configName); void setConfigProperties(Client client, Map<String, String> properties);  }