}
@Test
public void testNamedParametersViaClient() throws Exception
{
MuleClient client = muleContext.getClient();
Map<String, Object> props = new HashMap<String, Object>();
// create the soap method passing in the method name and return type
SoapMethod soapMethod = new SoapMethod(new QName("echo"), NamedParameter.XSD_STRING);
// add one or more parameters
soapMethod.addNamedParameter(new QName("value"), NamedParameter.XSD_STRING, ParameterMode.IN);
// set the soap method as a property and pass the properties
// when making the call
props.put(MuleProperties.MULE_SOAP_METHOD, soapMethod);
MuleMessage result = client.send("axis:http://localhost:" + dynamicPort.getNumber() + "/mule/mycomponent2?method=echo",
"Hello Named", props);
assertEquals("Hello Named", result.getPayload());
}