mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
Incorrect return value when using WireMock.Net with web service #397
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gpetrounrt on GitHub (Jan 26, 2022).
Clone https://github.com/gpetrounrt/WireMockWithVies and check https://github.com/gpetrounrt/WireMockWithVies/blob/main/WireMockWithVies/WireMockWithViesTest.cs
If I use "http://ec.europa.eu/taxation_customs/vies/services/checkVatService" as parameter in checkVatPortTypeClient to communicate with the corresponding WebService, I get back the expected exception message since the checkVatRequest input is invalid.
If I use http://localhost:15000/ instead as parameter in checkVatPortTypeClient, I get back a web page instead of the expected exception message.
Any idea what might be wrong in this case? Perhaps I am not using correct WireMockServerSettings? Or this might be a bug when trying to use a web service?
@StefH commented on GitHub (Jan 26, 2022):
@gpetrounrt
The code should be like:
@gpetrounrt commented on GitHub (Jan 27, 2022):
Thank you very much for the reply and the best practices information. I completely forgot that the Url should have the hostname. I have applied your suggestions and it works as expected.