title: How to invoke a SOAP Web service using Gatling 2.2.0
body: <p>I am new to Gatling and Scala. How to invoke / test a java SOAP web service using Gatling 2.2.0 ? I had searched google and gatling documentation, but could not find any link for that</p>
  
  <p>code:</p>
  
  <pre><code>    val httpProtocol = http
          .baseURL("http://PUNITP83267L:8081/WebServiceProject/services/MyService")
      val headers_0 = Map(
          "accept-encoding" -&gt; "gzip, deflate",
          "Content-Type" -&gt; "text/xml;charset=UTF-8",
          "SOAPAction" -&gt; "",
          "Content-Length" -&gt; "275",
          "Host" -&gt; "PUNITP83267L:8081",
          "Connection" -&gt; "alive",
          "accept-language" -&gt; "en-US,en;q=0.8",
          "user-agent" -&gt; "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36"
      )
  
      val scn = scenario("SOAPRecordedSimulation")
          .exec(http("simple Soap Request")
          .post("&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;&lt;soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"&gt;
                &lt;soapenv:Body&gt;&lt;greetMeResponse xmlns=\"http://ws.star.fs.infosys.com\"&gt;
                &lt;greetMeReturn&gt;Hello uMESH&lt;/greetMeReturn&gt;&lt;/greetMeResponse&gt;
                &lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;\"\r\n")
          .headers(headers_0))
      setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
  }
  </code></pre>