0

I am trying to use this test to test my webservice:

  "POST /phaseupdate" should {
    "return status 200" in {
      put("/phaseupdate", Map("filename" -> "test1", "entryaddress" -> "address 1","name" -> "starting","percentcomplete" -> "10")) {
        status must_== 200
      }
    }
  }

And the webservice definition is:

  post("/phaseupdate/:filename/:entryaddress/:name/:percentcomplete") {

But I am getting a 404 error, so it appears the way I am passing the parameters is wrong.

What is the correct way to get this test to call my webservice?

UPDATE

So this works, so my definition of the service is not what I expected:

put("/phaseupdate/test1/address1/starting/10") {
James Black
  • 41,583
  • 10
  • 86
  • 166
  • Is your webservice realy running at the moment you test? – tgr Aug 29 '12 at 14:35
  • @T.Grottker - Yes, it is started up by the framework, and I have several other tests that succeed, testing other webservices. – James Black Aug 29 '12 at 14:37
  • Are you able to connect to the webservice with this url? – tgr Aug 29 '12 at 14:38
  • @T.Grottker - The error I get is that it can't find the endpoint, so it seems that in order to call this I will need to use a different approach to call my service. – James Black Aug 29 '12 at 14:44
  • @T.Grottker - It appears the way I am defining my webservice, with scalatra is wrong, I will update how I got it to work, and ask a new question. – James Black Aug 29 '12 at 14:48

0 Answers0