Castle Mock

Mock REST APIs and SOAP web-services


Castle Mock is a web application that provides the functionality to mock out RESTful APIs and SOAP web-services. This functionality allows client-side developers to completely mimic a server side behavior and shape the responses themselves for when writing and conducting integration tests.

Castle Mock can create mocked services based on WSDL, WADL, Swagger and RAML definition files. The web-services defined within the files will be mocked automatically by Castle Mock. Once the mocks for the web-services are created, they can be configured to mock the service or forward the request to the original endpoint. The response from the forwarded requests can be recorded automatically and used to create new mocked responses.

Castle Mock is completely free and open source (Apache License 2.0). It is built with Java and the application itself is deployed to an Apache Tomcat server.

Mock both SOAP and REST web applications by easily defining them in web interface. Web applications can also be defined by importing services definitions, such as WSDL, WADL, Swagger and RAML files.
Proxy and record responses
Castle Mock can be used as a proxy between the client and the server. SOAP and REST requests can be forwarded towards the server and the responses can be recorded. All recorded response can be used as mocked responses.

Castle Mock logs all mapped SOAP and REST requests and responses. Each log entry contains detailed information about the request and response. It will also contain information about the mocked response if a service is configured to be mocked.

Easy installation

Install Castle Mock by downloading the WAR file and deploying it to a Apache Tomcat server. No additional configurations are required! You can also install and deploy Castle Mock with Docker.


Open source

Castle Mock is completely free and released under the license Apache License 2.0. Our latest and greatest source of Castle Mock can be found on GitHub. Fork us!



Castle Mock can be downloaded as Java Web Archive (.war) file and be deployed on a Apache Tomcat server (Apache Tomcat 8.0 or higher).  No additional configurations are required in order to get Castle Mock up and running.

Get started with Castle Mock

Step 1: Download
Download Castle Mock from this webpage.
Step 2: Install
Install a Tomcat server and deploy Castle Mock.
Step 3: Start mocking
Create your own projects and start mocking REST and SOAP APIs.
Step 4: Participate

Ask question and contribute to making Castle Mock better!

Use Castle Mock

Castle Mock can be accessed from the web browser when the installation is complete as such:


This will prompt you the login screen. When logging for the first time use the following credentials:

Username: admin Password: admin

It is recommended that the administrator profile gets updated with a more secure password. This is accomplish by going to the user page and choosing to update the profile.

Upon successful login, you will be able to create both SOAP and REST projects. SOAP and REST resources can either be created manually or created by importing resource descriptions, such as WSDL and WADL. All created resources can be mocked multiple times. Each resource can also be configured to have different response strategies, such as random and sequence

Framework support

Castle Mock loves Docker

Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux.

Castle Mock absolutely loves Docker. Docker allows you to simply setup and deploy your own instance of Castle Mock, by just typing one line. Download and install Docker by visiting their web page:

Use our official Docker image to setup and test Castle Mock:

docker run -d -p 8080:8080 castlemock/castlemock

Castle Mock can be accessed from the following address after the installation is finished

http://{CONTAINER IP}:8080/castlemock

For more information and details:


Karl Dahlgren

Founder and Developer


Mohammed Hewedy



Sam Faint

Logo Designer

Contact us