Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want the following input in my tXMLRPCInput:
<methodCall> <methodName>execute</methodName> <params> <param> <value><string>dbname</string></value> </param> <param> <value><int>2</int></value> </param> <param> <value><string>fou</string></value> </param> <param> <value><string>some.module</string></value> </param> <param> <value><string>some_method</string></value> </param> <!-- params --> <param> <param> <value><string>some.model_name</string></value> </param> <param> <value><string>another_param</string></value> </param> </param> </params> </methodCall>
I didn't find any example on how to use multi-dimensional value (struct, map, list, etc) for this component. Any clue?
Thanks.
OK, well looking at the structure I would try out the java.lang.Object[].class option and create a String[] of your values in Java. Save that in the globalMap and reference that in the component. For example....
String[] array = { "hello", "world", "how", "are", "you" }; globalMap.put("array",array);
This works perfectly using this useful site for testing this sort of stuff out ....
http://phpxmlrpc.sourceforge.net/server.php?methodName=interopEchoTests.echoStringArray
You can do this by using the Java classes that are specified for each parameter. So for a Map (for example), you can build your map data in a tJava like so....
java.util.Map map = new java.util.HashMap(); map.put("name", "James"); map.put("age", 23); map.put("address", "12 Baker Street"); globalMap.put("map_data", map);
The map is added to the globalMap so that you can use it anywhere in the job. When you get to your tXMLRPCInput component, your map parameter will be set up with a class value of "java.util.Map.class" and your value will be....
globalMap.get("map_data")
What does the structure look like? Can I see the documentation anywhere? The structure example you posted I am not sure is a valid structure since I do not believe that a <param> element can contain a <param> element. I assumed that it was an example of the type of thing you wanted to achieve.
OK, well looking at the structure I would try out the java.lang.Object[].class option and create a String[] of your values in Java. Save that in the globalMap and reference that in the component. For example....
String[] array = { "hello", "world", "how", "are", "you" }; globalMap.put("array",array);
This works perfectly using this useful site for testing this sort of stuff out ....
http://phpxmlrpc.sourceforge.net/server.php?methodName=interopEchoTests.echoStringArray