Hello.

I'm a bit hesitant about this change since it seems to have been around
since day-one, but maybe someone on this list knows the reasoning behind
it.

/****** BEGIN_REPRO_CODE *******/
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL("http://betty.userland.com/rpc";);
client = new XmlRpcClient();
client.setTransportFactory(new XmlRpcCommonsTransportFactory(client));
client.setConfig(config);

Vector<Object> outerParams = new Vector<Object>();
Map<String, Object> innerParams = new HashMap<String, Object>();
innerParams.put("id", 100);
innerParams.put("name", "abcdef");
outerParams.add(innerParams);

client.execute("do.something", outerParams);
/****** END_REPRO_CODE *******/

// outgoing request looks like this
<?xml version="1.0"encoding="UTF-8"?>
<methodCall>
        <methodName>do.something</methodName>
        <params>
                <param>
                        <value>
                                <struct>
                                        <member>
                                                <name>id</name>
                                                <value>
                                                        <i4>100</i4>
                                                </value>
                                        </member>
                                        <member>
                                                <name>name</name>
                                                <value>abcdefg</value>
                                        </member>
                                </struct>
                        </value>
                </param>
        </params>
</methodCall>

Whereas I would expect the value to have an additional <string/>
elemement like this:

<member>
        <name>name</name>
        <value>
                <string>abcdefg</string>
        </value>
</member>

I've attached a diff that makes it behave like I would expect but I'm
wondering if there was a reason for this to *not* be there already?

Thanks,

Joshua Hansen
Software Engineer | Slant Six Games
Direct: +1 604-637-9862
 

Reply via email to