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