Josep
04/02/2025, 3:03 PMAndrew Smith
04/03/2025, 2:34 PMJakub Vana
04/04/2025, 1:05 PMMissingResourceException
. It is interesting, beacuse if I remove the keystore password from the command I getting the keystore password was incorrect
message so the provided certificate should be mounted right. Thank you very much for help.
docker run -p 8443:8443 -v C:/wiremock/ssl:/ssl wiremock/wiremock --https-port 8443 --https-keystore /ssl/localhost.p12 --https-keystore-password password
Brandon Chatham
04/04/2025, 11:48 PM"postServeActions": {
"reset-scenarios": {
"parameters": {}
}
}
But this didn't work.
Thanks in advance for any helpRicha Tekriwal
04/08/2025, 10:07 AMNagaraj Manohar
04/11/2025, 2:23 PMOliver Jankowski
04/14/2025, 7:28 AM"serveEventListeners": [
{
"name": "recordState",
"parameters": {
"context": "{{response.headers.DocumentId}}",
"state": {
"blob": "{{{request.bodyAsBase64}}}"
}
}
}
]
Now I want to download the same data, but I can't use base64Body (see below), because base64Body doesn't support templating and I only can enter real base64 data there.
"response": {
"status": 200,
"base64Body": "{{state context=(state context=request.path.documentId property='contentLocationUri') property='blob'}}",
"headers": {
"Content-Type": "application/octet-stream",
"D3-Filename": "{{state context=request.path.documentId property='filename'}}"
}
}
Neither Base64 decoding works, because it produces illegal chars.
"response": {
"status": 200,
"body": "{{#base64 decode=true}}{{state context=(state context=request.path.documentId property='contentLocationUri') property='blob'}}{{/base64}}",
"headers": {
"Content-Type": "application/pdf",
"D3-Filename": "{{state context=request.path.documentId property='filename'}}"
}
}
Can someone please help me?
Thanks in advance
OliverRicha Tekriwal
04/14/2025, 2:30 PMRicha Tekriwal
04/14/2025, 2:30 PMDan Baehr
04/16/2025, 3:51 PMYonathan Shtekel
04/17/2025, 2:13 PMSlackbot
04/22/2025, 2:55 PMAbhishek R Prasad
04/22/2025, 4:38 PMapiVersion: apps/v1
kind: Deployment
metadata:
name: mec-cc-wiremock-cdt
namespace: mec-carrier-connector-cdt
labels:
app: wiremock-custom
spec:
replicas: 1
selector:
matchLabels:
app: mec-cc-wiremock-cdt
template:
metadata:
labels:
app: mec-cc-wiremock-cdt
spec:
volumes:
- name: mec-cc-wiremock-cdt-storage
persistentVolumeClaim:
claimName: mec-cc-wiremock-storage
containers:
- name: mec-cc-wiremock-custom-cdt
image: wiremock/wiremock:3.12.1-1
args:
- "--persist-mappings"
volumeMounts:
- name: mec-cc-wiremock-cdt-storage
mountPath: /mnt/azure
ports:
- containerPort: 8080
securityContext:
allowPrivilegeEscalation: false
resources:
limits:
cpu: 1500m
memory: 2Gi
requests:
cpu: 750m
memory: 1Gi
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 5
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 5
I am unable to persist the mappings this way. Am I doing something wrong ?
I would really appreciate any help !!! 🙌Bryson Edwards
04/23/2025, 6:20 PMAlex Jircan
04/24/2025, 9:05 AMAbhishek R Prasad
04/25/2025, 8:14 AMEdiba Zugor
04/25/2025, 9:35 AM"serveEventListeners": [
{
"name": "webhook",
"parameters": {
"method": "POST",
"url": "https://......",
"headers": {
"Accept": "application/json; charset=utf-8; version=1",
"Content-Type": "application/json"
},
"body": "{\"test\": \"{{regexExtract originalRequest.query.token '^[^.]+\\.([^.]+)\\..*$' 'parts.1'}}\"}"
}
}
]
Mitch Smith
04/25/2025, 6:47 PM.jar
in the /var/wiremock/extensions
folder, but it doesn't seem to load the extension (rebuilt image, recreated container, and startup log displays all my other exceptions but not this one)
edit - answered my own question 🙂Ed
04/29/2025, 7:53 AMEd
04/29/2025, 7:57 AMjava -jar .\wiremock-standalone-3.13.0.jar --print-all-network-traffic
I have a json file in the mappings directory that configure the proxy and should remove Authorization header:
{
"request": {
"method": "POST",
"url": "/notification"
},
"response": {
"proxyBaseUrl": "<http://localhost:8081>",
"removeProxyRequestHeaders": [
"Authorization"
]
}
}
but at the end, the Authorization header is still sent to the final server
did I miss anything?Abhishek R Prasad
04/30/2025, 6:10 AMcurl --request POST \ --url <http://localhost:8080/__admin/mappings> \ --header 'content-type: application/json' \ --data '{ "priority": 15, "request": { "method": "GET", "urlPath": "/reports/awb/tracking", "queryParameters": { "clientId": { "equalTo": "323245" }, "language": { "equalTo": "en" }, "awb[]": { "matches": ".+" } } }, "response": { "status": 200, "headers": { "Content-Type": "application/json" }, "jsonBody": { "status": "success", "data": [ { "awbNumber": "{{request.query.awb[0]}}", "content": "test", "confirmation": { "name": "test", "date": "2023-03-06 13:58" }, "returnAwbNumber": null, "events": [ { "id": "H4", "name": " Shipment sorted on the belt", "location": "Bucharest", "date": "2023-03-01 04:46:46" }, { "id": "H10", "name": " Shipment in transit towards the destination warehouse ", "location": "Bucharest", "date": "2023-03-01 05:19:10" } ] } ] }, "transformers": [ "response-template" ] }, "persistent": true }'
I have deployed Wiremock using Flux (kubernetes) and I am using the below arguments :
args:
- "--no-request-journal"
- "--disable-request-logging"
- "--max-template-cache-entries=50"
- "--local-response-templating"
- "--root-dir"
- "/mnt/azure"
not sure why "--local-response-templating" does not work in this case.
Could you please let me know how I can fix this 🙂 .Claudio Waldvogel
04/30/2025, 9:58 PMpublic class WebhookSigningExtension implements WebhookTransformer {
@Override
public WebhookDefinition transform(ServeEvent serveEvent, WebhookDefinition webhookDefinition) {
System.out.println("WebhookSigningExtension: transform called");
return webhookDefinition;
}
@Override
public String getName() {
return "webhook-signer";
}
}
Code to test the transformer:
public class Main {
public static void main(String[] args) {
WireMockServer wireMockServer = new WireMockServer(
WireMockConfiguration.options().port(8080).extensions(new WebhookSigningExtension())
);
wireMockServer.start();
wireMockServer.stubFor(<http://WireMock.post|WireMock.post>(WireMock.urlPathEqualTo("/webhook"))
.willReturn(WireMock.ok())
.withServeEventListener("webhook", Webhooks.webhook()
.withMethod(<http://RequestMethod.POST|RequestMethod.POST>)
.withUrl("<http://localhost:9898/webhook/test>")
.withHeader("Content-Type", "application/json")
.withBody("{ \"result\": \"SUCCESS\" }"))
);
}
}
Do I have to implement the logic to enabled/disable the transformer by passing custom parameter?
Thanks in advance,
ClaudioPatrick Davy
05/01/2025, 4:27 PMhome/wiremock
directory anymore, it's exactly the same image as the one I pulled and tested locally.
Any ideas what's going on here or potential avenues of investigation?Barns Anderson
05/05/2025, 4:46 AMBackingStore
. I've read that it is specified in the options when we initialise a WireMockServer like this:
WireMockConfiguration config = WireMockConfiguration.options()
.port(8080)
.backingStore(new FileBasedBackingStore("wiremock_data"));
WireMockServer wireMockServer = new WireMockServer(config);
wireMockServer.start();
Where the FileBasedBackingStore
is imported from here: com.github.tomakehurst.wiremock.store.file.FileBasedBackingStore
. However the package structure has changed since then.
Is the BackingStore no longer a thing?
Best wishes and many thanks in advance.Andreas Winter
05/06/2025, 11:28 AMwireMockConfig()
.[...]
.keystorePath(<somePath>)
.keystoreType(KEYSTORE_TYPE)
.keystorePassword(KEYSTORE_PASSWORD)
Ravi Shankar Reddy Kanakaveedu
05/08/2025, 10:26 AMmappings
and __files
folders. When Recording
is enabled we could see actual API call is being made and recordings/stubMappings
are saved in mappings
and __files
, but we want to update existing mappings
instead of creating new files in mappings and __files
folder.
Can someone let us know if it is possible?rishi
05/09/2025, 4:11 AMManish Arora
05/12/2025, 10:43 AM"urlPathPattern": "/v3/item*",
"queryParameters": {
"item": {
"doesNotMatch": "^00000000[1-2]$"
}
}
but it's also matching with another type of request
"urlPathPattern": "/v3/item*",
"queryParameters": {
"product": {
"equalTo": "12312321421"
}
}
My understanding is that because in second json request item is null but it's satisfying condition for
"doesNotMatch": "^00000000[1-2]$"
which is why wiremock is responding with stub mapped to first reques while ideally it should respond with stub for second mapping.
I know with priority this can fixed but in my application already priorities are set and getting messed up.
Does wiremock provide anything for such scenario ?Anil Mullamuri
05/13/2025, 8:31 AMjunwei chen
05/14/2025, 1:44 AM