1   /*
2    * $Id: XFireSoapRequestNoMethodParamTestCase.java 7963 2007-08-21 08:53:15Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.providers.soap.xfire;
12  
13  import org.mule.extras.client.MuleClient;
14  import org.mule.impl.MuleMessage;
15  import org.mule.tck.FunctionalTestCase;
16  import org.mule.umo.UMOMessage;
17  
18  public class XFireSoapRequestNoMethodParamTestCase extends FunctionalTestCase
19  {
20      private static final String request = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><soap:Body><receive xmlns=\"http://www.muleumo.org\"><src xmlns=\"http://www.muleumo.org\">Test String</src></receive></soap:Body></soap:Envelope>";
21      private static final String response = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><soap:Body><ns1:receiveResponse xmlns:ns1=\"http://www.muleumo.org\"><ns1:out>Received: Test String</ns1:out></ns1:receiveResponse></soap:Body></soap:Envelope>";
22  
23      public void testXFireSoapRequest() throws Exception
24      {
25          MuleClient client = new MuleClient();
26  
27          UMOMessage msg = client.send("http://localhost:63381/services/TestComponent",
28              new MuleMessage(request));
29  
30          assertNotNull(msg);
31          assertNotNull(msg.getPayload());
32          assertEquals(response, msg.getPayloadAsString());
33      }
34  
35      protected String getConfigResources()
36      {
37          return "xfire-soap-request-conf.xml";
38      }
39  
40  }