URL /MCEOfferManagement is match, but body is not
If I then copy the XML body that is written to the log and paste it into web client such as Postman and make the request it matches successfully. I am really confused about this!
Any ideas why Wiremock is not recognising it as a match in one instance but it does in another? Is there anything I should be looking for?
Thanks
Simon{ "mappings": [ { "request": { "url": "/soaptest", "method": "POST", "bodyPatterns" : [ { "matchesXPath" : "SOAP-ENV:Envelope/SOAP-ENV:Body/report:GetReportXml//report:First[text()='test']", "xPathNamespaces" : { "SOAP-ENV" : "http://schemas.xmlsoap.org/soap/envelope/", "report" : "http://schemas.xmlsoap.org/soap/encoding/" } } ] },
"response": { "status": 200, "headers": { "Content-Type" : "application/json" }, "bodyFileName": "sayhello.xml" } },
{ "request": { "url": "/soaptest", "method": "POST", "bodyPatterns" : [ { "matchesXPath" : "SOAP-ENV:Envelope/SOAP-ENV:Body/report:GetReportXml//report:Surname[text()='JOSEPH']", "xPathNamespaces" : { "SOAP-ENV" : "http://schemas.xmlsoap.org/soap/envelope/", "report" : "http://schemas.xmlsoap.org/soap/encoding/" } } ] },
"response": { "status": 200, "headers": { "Content-Type" : "application/json" }, "bodyFileName": "sayhello.xml" } } ]}