Hi guys, i have problem with mocking SOAP in WM. I...
# help
l
Hi guys, i have problem with mocking SOAP in WM. I have xml file in mappings, running standalone version and check curl http://localhost:8080/__admin/mappings. In response receiving: { "mappings" : [ ], "meta" : { "total" : 0 } } For json works correctly. XML file in attachment.
t
WireMock doesn’t support XML as a way of describing stubs. That has to be JSON. However, you can return XML in your HTTP responses, either inlined in the
body
field under the response, or in a separate file under the
__files
directory referenced by
bodyFileName
l
Something like this ? { "request": { "method": "GET", "url": "/your-api-endpoint" }, "response": { "status": 200, "headers": { "Content-Type": "application/xml" }, "body": "<your-xml-response>...</your-xml-response>" } }
👍 1