use of org.apache.xmlrpc.client.XmlRpcClientConfigImpl in project camel by apache.
the class XmlRpcEndpoint method doStart.
@Override
protected void doStart() throws Exception {
super.doStart();
if (clientConfig == null) {
clientConfig = new XmlRpcClientConfigImpl();
}
Map<String, Object> params = new HashMap<String, Object>();
// do not include null values
IntrospectionSupport.getProperties(configuration, params, null, false);
setProperties(clientConfig, params);
}
use of org.apache.xmlrpc.client.XmlRpcClientConfigImpl in project camel by apache.
the class XmlRpcEndpointTest method testEndpointSetting.
// create the endpoint with parameters
@Test
public void testEndpointSetting() throws Exception {
camelContext.start();
XmlRpcEndpoint endpoint = (XmlRpcEndpoint) camelContext.getEndpoint("xmlrpc:http://www.example.com?userAgent=myAgent&gzipCompressing=true&connectionTimeout=30&defaultMethodName=echo");
XmlRpcClientConfigImpl clientConfig = endpoint.getClientConfig();
assertEquals("Get a wrong userAgent", "myAgent", clientConfig.getUserAgent());
assertEquals("Get a wrong gzipCompressing", true, clientConfig.isGzipCompressing());
assertEquals("Get a wrong connectionTimeout", 30, clientConfig.getConnectionTimeout());
assertEquals("Get a wrong endpoint address", "http://www.example.com", endpoint.getAddress());
assertEquals("Get a worng default method name", "echo", endpoint.getDefaultMethodName());
}
Aggregations