1
2
3
4
5
6
7
8
9
10
11 package org.mule.providers.soap.axis;
12
13 import org.mule.impl.ImmutableMuleEndpoint;
14 import org.mule.tck.AbstractMuleTestCase;
15 import org.mule.umo.UMOEvent;
16 import org.mule.umo.UMOMessage;
17 import org.mule.umo.endpoint.UMOImmutableEndpoint;
18
19 import java.util.List;
20 import java.util.Map;
21
22 import org.apache.axis.client.Call;
23 import org.apache.axis.client.Service;
24
25 public class AxisMessageDispatcherTestCase extends AbstractMuleTestCase
26 {
27
28 public void testNullParametersInCallAllowed() throws Exception
29 {
30 UMOImmutableEndpoint ep = new ImmutableMuleEndpoint(
31 "axis:http://www.muleumo.org/services/myService?method=myTestMethod", false);
32 AxisMessageDispatcher dispatcher = new AxisMessageDispatcher(ep);
33 dispatcher.service = new Service();
34 UMOEvent event = getTestEvent("testPayload", ep);
35
36 Call call = dispatcher.getCall(event, new Object[]{null});
37
38 assertNotNull(call);
39
40 UMOMessage msg = event.getMessage();
41 assertNotNull(msg);
42 final Map soapMethods = (Map)msg.getProperty("soapMethods");
43 assertEquals(1, soapMethods.size());
44 final List values = (List)soapMethods.get("myTestMethod");
45 assertNotNull(values);
46 assertEquals(1, values.size());
47 assertEquals("value0;qname{:anyType:http://www.w3.org/2001/XMLSchema};in", values.get(0));
48 }
49
50 }