No mapping found matching URL

654 views
Skip to first unread message

Sri Vidya

unread,
Dec 12, 2015, 12:50:19 AM12/12/15
to wiremock-user

Hi,

I am new to wiremock. When i tried xml body matching in standalone wiremock- java -jar wiremock-1.57-standalone.jar --port 8090 --verbose and hit the url http://localhost:8090/with/xmlBody


I am getting below error in console:
2015-12-11 15:26:22.395 URL /with/xmlBody is match, but method GET is not
2015-12-11 15:26:22.396 No mapping found matching URL /with/xmlBody


And on page:
HTTP ERROR 404
Problem accessing /__files/with/xmlBody. Reason: NOT_FOUND


Here is my json:

{

    "request": {

        "method": "POST",

        "urlPattern": "/with/xmlBody",

        "bodyPatterns" : [

{ "equalToXml" : "<IsEmailExists> <emailID>te...@mail.com</emailID> </IsEmailExists>" }

]

    },

    "response": {

"status": 200,

                "body" : "<IsEmailExistsResponse><IsEmailExistsResult>false</IsEmailExistsResult></IsEmailExistsResponse>"

    }

Sri Vidya

unread,
Dec 14, 2015, 1:20:18 AM12/14/15
to wiremock-user
Hi Tom,
          
           As per example given in http://wiremock.org/stubbing.html "XML body matching" i have modified the xml as below.  

        "bodyPatterns" : [

{ "equalToXml" : "<IsEmailExists> <emailID>te...@mail.com</emailID> </IsEmailExists>" }

]   

            Still i am getting the error:
                 2015-12-14 11:47:44.896 URL /with/xmlBody is match, but method GET is not
                 2015-12-14 11:47:44.897 No mapping found matching URL /with/xmlBody

            Please help me resolve this issue.

Regards,
Srividya.
 

Tom Akehurst

unread,
Dec 14, 2015, 5:38:33 AM12/14/15
to wiremock-user
Looks like you're sending a GET request whereas you've configured your stub to match on POST.
Reply all
Reply to author
Forward
0 new messages