Passing XML request as a feed to body

Hi All,

I am trying to achieve test where XML body will be passed as feed to the body so that script is more readable. All the content which i have found so far is more related to JSON, i couldn’t find information on XML requests. Inputs would be highly appreciated.

package computerdatabase

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._

class FXISimulation extends Simulation {

val httpProtocol = http
.baseUrl(“”) // Here is the root for all relative URLs

val header = Map(
“Content-Type” → “application/soap+xml;charset=UTF-8”,
“Connection” → “alive”,

“User-agent” → “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0”)

object payload_myUHC{

val pl1 = scenario(“pl1test”).feed(data).exec(http(“myABC”)
.body(RawFileBody(“XMLBody.txt”)) //This is where I would like to pass XML from flat file as input