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
26
27
28 public class AxisMessageDispatcherTestCase extends AbstractMuleTestCase
29 {
30
31 public void testNullParametersInCallAllowed() throws Exception
32 {
33 UMOImmutableEndpoint ep = new ImmutableMuleEndpoint(
34 "axis:http://www.muleumo.org/services/myService?method=myTestMethod", false);
35 AxisMessageDispatcher dispatcher = new AxisMessageDispatcher(ep);
36 dispatcher.service = new Service();
37 UMOEvent event = getTestEvent("testPayload", ep);
38
39 Call call = dispatcher.getCall(event, new Object[]{null});
40
41 assertNotNull(call);
42
43 UMOMessage msg = event.getMessage();
44 assertNotNull(msg);
45 final Map soapMethods = (Map)msg.getProperty("soapMethods");
46 assertEquals(1, soapMethods.size());
47 final List values = (List)soapMethods.get("myTestMethod");
48 assertNotNull(values);
49 assertEquals(1, values.size());
50 assertEquals("value0;qname{:anyType:http://www.w3.org/2001/XMLSchema};in", values.get(0));
51 }
52
53 }