* Verifies that the method
* <code>{@link XmlRpcRequestParser#parseRequest(InputStream)}</code> parses
* correctly a XML-RPC request containing struct parameters.
*/
public final void testParseRequestWithStructParameters() {
XmlRpcStruct xmlRpcStruct = new XmlRpcStruct();
xmlRpcStruct.add("name", new XmlRpcString("Darth Vader"));
xmlRpcStruct.add("role", new XmlRpcString("Sith lord"));
XmlRpcElement[] parameters = { xmlRpcStruct };
XmlRpcRequest expected = new XmlRpcRequest(this.serviceName,
this.methodName, parameters);
StringBuffer builder = new StringBuffer();
builder.append("<?xml version=\"1.0\"?>");
builder.append("<methodCall><methodName>");
builder.append(this.serviceAndMethodNames);
builder.append("</methodName><params><param><value><struct>");
XmlRpcMember[] members = xmlRpcStruct.getMembers();
int memberCount = members.length;
for (int i = 0; i < memberCount; i++) {
XmlRpcMember member = members[i];
XmlRpcString value = (XmlRpcString) member.value;