SOAP calls

import io.gatling.core.Predef._
import io.gatling.http.Predef._

class Rutger extends Simulation {

val httpProtocol = http
.acceptEncodingHeader(“gzip, deflate”)

val Test = scenario(“Rutger”)
.body(StringBody("<soapenv:Envelope xmlns:soapenv=“” xmlns:req=“http://test.comt” xmlns:com=“” xmlns:ser=“”>
.check(regex(“Envelope xmlns”))


Hello everybody,

this works perfectly, but how dow I integrate

val User = “WebServiceTest1”

val Password = “WebServiceTest1”

with basicAuth() ?

and how can you integrate an wsdl file in your scenario?


how dow I integrate

val User = “WebServiceTest1”

val Password = “WebServiceTest1”

with basicAuth() ?

and how can you integrate an wsdl file in your scenario?

Not supported. Use SoapUI for generating a body template (which you probably already do).

We really do not want to use SOAPUI, because we like Gatling.

So is there a way to work around the wsdl aspect and integrate it as an:

  • bodyPart
  • ELfileBody
  • Or as an URL

Tnx Stephane

What I meant with SoapUI was just use it to reverse engineer the WSDL into a SOAP sample and paste it into a StringBody or a ELfileBody.
As of now, we don’t have our own WSDL reverse engineering tool. And that’s something that has to happen prior to running the simulation as you’ll want to edit it in order to add some EL placeholders.

Does this solution suites you? Or do you have something else in mind?

One thing…

…your the man!!

Thank you

You’re welcome :slight_smile:

Hi Aram/Steph,

I am quite new to gatling and scala.

I have a WSDL and a request XML and generally use SOAP UI to get the response.

Now, I want to use gatling to call the same web service to scale its performance in case concurrent users are accessing the same…

I tried to use below program (from Aram) and, but getting compilation errors like this. Can you please help me in resolving these?

GATLING_HOME is set to “C:\Users\MyID\gatling-charts-highcharts-bundle-2.2.4”
JAVA = “java”
14:26:01.481 [ERROR] i.g.c.ZincCompiler$ - C:\Users\MyID\gatling-charts-highcharts-bundle-2.2.4\user-files\simulations\Sample_Gatling\getQuote.scala:22: unclosed string literal
14:26:01.483 [ERROR] i.g.c.ZincCompiler$ - </soapenv:Envelope>"))
14:26:01.483 [ERROR] i.g.c.ZincCompiler$ - ^
14:26:01.492 [ERROR] i.g.c.ZincCompiler$ - C:\Users\MyID\gatling-charts-highcharts-bundle-2.2.4\user-files\simulations\Sample_Gatling\getQuote.scala:17: identifier expected but $XMLSTART$< found.
14:26:01.492 [ERROR] i.g.c.ZincCompiler$ - soapenv:Header/
14:26:01.492 [ERROR] i.g.c.ZincCompiler$ - ^
14:26:01.492 [ERROR] i.g.c.ZincCompiler$ - C:\Users\MyID\gatling-charts-highcharts-bundle-2.2.4\user-files\simulations\Sample_Gatling\getExpectedAmount.scala:27: ‘)’ expected but ‘}’ found.
14:26:01.492 [ERROR] i.g.c.ZincCompiler$ - }
14:26:01.493 [ERROR] i.g.c.ZincCompiler$ - ^
14:26:01.496 [ERROR] i.g.c.ZincCompiler$ - three errors found
14:26:01.498 [ERROR] i.g.c.ZincCompiler$ - Compilation crashed
sbt.compiler.CompileFailed: null