https://linen.dev logo
#help
Title
# help
l

Leszek Izdebski

01/15/2024, 9:29 AM
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

Tom

01/15/2024, 10:22 AM
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

Leszek Izdebski

01/15/2024, 10:24 AM
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