-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to read response from file #243
Comments
I've fixed you example, the "Headers" where wrongly defined. It should be: {
"Request": {
"Path": {
"Matchers": [
{
"Name": "WildcardMatcher",
"Pattern": "/myreq",
"IgnoreCase": false
}
]
},
"Methods": [
"post"
]
},
"Response": {
"StatusCode": 201,
"Headers": {"Content-Type": "application/xml"},
"BodyDestination": "SameAsSource",
"BodyAsFile": "MyXmlResponse.xml",
"UseTransformer": false
}
} Can you try this? |
@StefH - nope still it doesn't work and shows the same logs. |
The error message is like: 2018-12-17 07:41:17 [Info] : Reading Static MappingFile : 'c:\temp-wiremock\__admin\mappings\MyXmlResponse.xml'
2018-12-17 07:41:17 [Error] : Static MappingFile : 'c:\temp-wiremock\__admin\mappings\MyXmlResponse.xml' could not be read. This file will be skipped. This is correct, however WireMock should only read .json files and not others. And there is a problem reading files with no path. I'll check if I can update this. See also #56 |
If I keep If I keep |
If you like, you can use the NuGet from MyGet 1.0.7-ci-1623 to test this fixed code. |
@arpymastro Are you able to use the test version |
@arpymastro Did you have time to check? |
Code merged to master branch and a new NuGet will be created shortly. |
I still have this issue. Logs show a perfect match but the file content is not being returned by the proxy. I've tried setting absolute and relatives paths already.. neither worked. |
@thewholuver94 Please create a full example project to show this error. |
This comment has been minimized.
This comment has been minimized.
The issue was local... The xml format that I saved in added extra white space and the service I was proxying refused the entire response with the extra white space. Everything is working as it should. Thanks. |
I am trying to read a .xml response kept in a separate file under my mappings folder.
I have two files under my mappings folder -
MyJsonReq.json
andMyXmlResponse.xml
MyJsonReq.json -
/// snip ///
If I check the logs it is showing -
could not be read.This file will be skipped
for both MyJsonReq.json and MyXmlResponse.xmlThe text was updated successfully, but these errors were encountered: