# SOAP Request throwing 404 error

**URL:** <https://community.gatling.io/t/soap-request-throwing-404-error/4811>\
**Category:** Gatling (Open-Source)\
**Created:** [February 11, 2019, 9:18pm UTC](https://community.gatling.io/t/soap-request-throwing-404-error/4811 "2019-02-11T21:18:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikram\_Verma](https://avatars.discourse-cdn.com/v4/letter/v/ee59a6/32.png) [@Vikram\_Verma](https://community.gatling.io/u/Vikram_Verma)\
**Post date:** [February 11, 2019, 9:18pm UTC](https://community.gatling.io/t/soap-request-throwing-404-error/4811/1 "2019-02-11T21:18:54Z")

</div>

I am new to Gatling. My project deals with SOAP requests only. So I created a sample SOAP request for my understanding.

Error:

15:01:40.509 [WARN] i.g.h.e.r.DefaultStatsProcessor - Request ‘request\_1’ failed for user 6: status.find.in(200,201,202,203,204,205,206,207,208,209,304), found 404

Scala:

`

package computerdatabase

import io.gatling.core.Predef.\_

import io.gatling.http.Predef.\_

import scala.concurrent.duration.\_

class BasicSimulation1 extends Simulation {

val httpProtocol = http

.baseUrl(“[http://www.dataaccess.com/webservicesserver/numberconversion.wso](http://www.dataaccess.com/webservicesserver/numberconversion.wso)”) // Here is the root for all relative URLs

val header = Map(

“Content-Type” → “application/soap+xml;charset=UTF-8”,

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

val scn = scenario(“SoapTest1”) // A scenario is a chain of requests and pauses

.exec(http(“request\_1”)

.post(“Claim”)

.headers(header)

.body(StringBody("""\<soapenv:Envelope xmlns:soapenv=“[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)” xmlns:web=“[http://www.dataaccess.com/webservicesserver/](http://www.dataaccess.com/webservicesserver/)”\>

soapenv:Header/

soapenv:Body

web:NumberToDollars

web:dNum100\</web:dNum\>

\</web:NumberToDollars\>

\</soapenv:Body\>

\</soapenv:Envelope\>""")))

setUp(scn.inject(rampUsers(100) during (60 seconds))).protocols(httpProtocol)

}

`

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [February 11, 2019, 11:06pm UTC](https://community.gatling.io/t/soap-request-throwing-404-error/4811/2 "2019-02-11T23:06:45Z")

</div>

404 means “Not Found”.

Your baseUrl, which is a prefix, is “[http://www.dataaccess.com/webservicesserver/numberconversion.wso](http://www.dataaccess.com/webservicesserver/numberconversion.wso)”.  
Your relative url is “Claim”.  
Hence, Gatling computes the actual url as “[http://www.dataaccess.com/webservicesserver/numberconversion.wso](http://www.dataaccess.com/webservicesserver/numberconversion.wso)Claim”.

Doesn’t look correct to me.

---

<div class="post-metadata">

**Author:** ![Vikram\_Verma](https://avatars.discourse-cdn.com/v4/letter/v/ee59a6/32.png) [@Vikram\_Verma](https://community.gatling.io/u/Vikram_Verma)\
**Post date:** [February 12, 2019, 2:04am UTC](https://community.gatling.io/t/soap-request-throwing-404-error/4811/3 "2019-02-12T02:04:22Z")

</div>

Thank you Stephane! I didn’t know that respective element refers to relative URL. Your inputs helped fix the issue.

Thanks,  
Vikram
