Hi all

I will be forever thankful if someone can help me - I've tried everything and nothing seems to work.

I am communicating with a specific server using a protocol that uses XML-RPC as its carrier. The only difference is that the http header has the protocol and user agent set appropriately. I cannot get these to change, no matter what I try. This is what I have:

Java Code:
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(new URL("<adress here>:<port>/xmlrpc"));
config.setConnectionTimeout(60 * 1000);
config.setReplyTimeout(60 * 1000);

config.setBasicEncoding(XmlRpcClientConfigImpl.UTF8_ENCODING);
config.setBasicUserName("johndoe");
config.setBasicPassword("s3cr3t");
			
XmlRpcClient client = new XmlRpcClient();
client.setConfig(config);

// set transport
HttpClient httpClient = new HttpClient();
httpClient.getParams().setParameter(HttpMethodParams.USER_AGENT, "UGw Server/2.0/1.0");
httpClient.getParams().setParameter(HttpMethodParams.PROTOCOL_VERSION, "/Air HTTP/1.1");
XmlRpcCommonsTransportFactory transportFactory = new XmlRpcCommonsTransportFactory(client);
transportFactory.setHttpClient(httpClient);
client.setTransportFactory(transportFactory);
				
// make the xml-rpc regular call (just a silly test).
// (this works by the way on the test xml-rpc server that I wrote)

HashMap<String, Double> c1 = new HashMap<String, Double>();
c1.put("i", new Double(1));
c1.put("r", new Double(2));

HashMap<String, Double> c2 = new HashMap<String, Double>();
c2.put("i", new Double(4));
c2.put("r", new Double(5));

Object[] params = new Object[] { c1, c2 };
HashMap<String, Double> result = (HashMap<String, Double>) client.execute("Calc.sum", params);
System.out.println(result.get("r") + " / " + result.get("i"));
	
HashMap<String, Double> c2 = new HashMap<String, Double>();
c2.put("i", new Double(4));
c2.put("r", new Double(5));

Object[] params = new Object[] { c1, c2 };
HashMap<String, Double> result = (HashMap<String, Double>) client.execute("Calc.sum", params);

System.out.println(result.get("r") + " / " + result.get("i"));
As you can see in my debug trace, I get the incorrect header:

[DEBUG] header - >> "POST /xmlrpc HTTP/1.1[\r][\n]" :mad:
[DEBUG] header - >> "Content-Type: text/xml[\r][\n]"
[DEBUG] header - >> "User-Agent: Apache XML RPC 3.0 (Jakarta Commons httpclient Transport)[\r][\n]" :mad:
[DEBUG] header - >> "Authorization: Basic am9obmRvZTpzM2NyM3Q=[\r][\n]"
[DEBUG] header - >> "Host: localhost:7000[\r][\n]"
[DEBUG] header - >> "Content-Length: 532[\r][\n]"
[DEBUG] header - >> "[\r][\n]"

Most appreciated,
Thank you kindly.