Git Product home page Git Product logo

castlemock / castlemock Goto Github PK

View Code? Open in Web Editor NEW
314.0 16.0 97.0 17.78 MB

Castle Mock is a web application that provides the functionality to mock out RESTful APIs and SOAP web services.

Home Page: https://castlemock.com

License: Apache License 2.0

Java 84.47% CSS 0.25% JavaScript 15.23% ANTLR 0.03% HTML 0.02% Procfile 0.01%
java rest-api restful-api soap web-service mocking docker tomcat cross-platform

castlemock's Introduction

Castle Mock:
Mock RESTful 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 behaviour and shape the responses themselves.

Table Of Content

About

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). It is built with Java and the application itself is deployed to an Apache Tomcat server.

What to Use Castle Mock for and When to Use It

Use Castle Mock to mock out RESTful APIs and SOAP web services for testing purposes for when either performing system or integration tests. It is recommended to only use Castle Mock on an internal network and never be used publically. Castle Mock is NOT developed or meant for anything else other than for testing purposes.

Download

Non-source downloads such as WAR files can be found on our website: https://www.castlemock.com/. The WAR files can also be located and downloaded from GitHub Releases.

Installation

Castle Mock can be downloaded as Java Web Archive (.war) file and be deployed on a Apache Tomcat server (Java 21+ and Apache Tomcat 10). Castle Mock can also be deployed by using Docker. For more information go to the offical Castle Mock Docker page: https://hub.docker.com/r/castlemock/castlemock/.

Upon successful installation and deployment, Castle Mock can be accessed from the web browser:

http://localhost:8080/castlemock

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

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: https://docker.com

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: https://hub.docker.com/r/castlemock/castlemock

Documentation

Documentation can be found under our GitHub Wiki.

Communication

Bugs and Feedback

For bugs, questions and discussions please use the GitHub Issues. Please read our FAQ and Code Of Conduct before creating a new issue.

Continuous integration

Castle Mock's continuous integration environment is publicly available and can be access on the following link: Travis CI

News and Website

All information about Castle Mock can be found on our website. Follow us on Twitter: CastleMock.

License

Castle Mock is licensed under the Apache License. The terms of the license are as follows:

Apache License

Copyright 2015 Karl Dahlgren and a number of other contributors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

castlemock's People

Contributors

amduser avatar bodiam avatar castlemock avatar dependabot[bot] avatar fortmocks avatar grumpymeow avatar harpipl avatar karldahlgren avatar leandrocharlier avatar mariog-tw avatar mbilinainteca avatar mhewedy avatar mosesjebish avatar osopromadze avatar snyk-bot avatar tobiasrdm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

castlemock's Issues

Castlemock responsing main page in a SOAP PORT

Hi, I'm using Castlemock through the docker image. I configured a SOAP project, so I imported the WSDL and now when I call the Castlemock through my client the response from Castlemock is 200 with content of main page. I did a lot of calls using a HTTP tool and works ok. I saw that not work with this Content-Type::

application/soap+xml; charset=utf-8;action="http://com.br/EfetuarLogin"

and works with this

application/soap; charset=utf-8;action="http://com.br/EfetuarLogin"

Bellow my request and response

---[HTTP request - http://localhost:9000/castlemock/mock/soap/project/dbbaVA/WSReservawebSoap]---
Accept: application/soap+xml, multipart/related
Content-Type: application/soap+xml; charset=utf-8;action="http://com.br/EfetuarLogin"
User-Agent: JAX-WS RI 2.2.9-b130926.1035 svn-revision#5f6196f2b90e9460065a4c2f4e30e065b245e51e

emailusu2ZPortugues--------------------

Response:

---[HTTP response - http://localhost:9000/castlemock/mock/soap/project/dbbaVA/WSReservawebSoap - 200]---
null: HTTP/1.1 200
Content-Language: en
Content-Length: 4248
Content-Type: text/html;charset=UTF-8
Date: Fri, 01 Dec 2017 20:32:56 GMT
Set-Cookie: JSESSIONID=845FCEF19ED22C604D2269A51CBDC1B0; Path=/castlemock; HttpOnly
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block

<title>Castle Mock</title> <script>var demoMode =false</script> <script type="text/javascript" charset="UTF-8" src="/castlemock/resources/js/jquery/jquery-2.1.4.min.js"></script> <script type="text/javascript" charset="UTF-8" src="/castlemock/resources/js/bootstrap/bootstrap.js"></script> <script type="text/javascript" charset="UTF-8" src="/castlemock/resources/js/main-script.js"></script> <script type="text/javascript" charset="UTF-8" src="/castlemock/resources/js/table.js"></script> <script type="text/javascript" charset="UTF-8" src="/castlemock/resources/js/tooltip.js"></script> <script type="text/javascript" charset="UTF-8" src="/castlemock/resources/js/demoMode.js"></script>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar top-bar"></span>
                <span class="icon-bar middle-bar"></span>
                <span class="icon-bar bottom-bar"></span>
            </button>
            <a class="navbar-brand logo" href="/castlemock/web">Castle Mock  <img src="/castlemock/resources/images/logo-landscape-white.png" id="header-logo"/></a>
        </div>

        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="links nav navbar-nav navbar-right">
                <form id="searchCommand" class="navbar-form navbar-left search" action="/castlemock/web/search" method="POST">
                    <div class="form-group">
                        <input id="query" name="query" placeholder="Search..." type="text" onfocus="this.placeholder = &#39;&#39;" value=""/>
                    </div>
                <div>
  • Home
  • anonymousUser
  • Events
  •                 <li><a href="/castlemock/web/logout" data-toggle="tooltip" data-placement="bottom" title="Logout"><i class="fa fa-sign-out fa-2x"></i><span class="title"> Logout</span></a></li>
                </ul>
            </div>
        </div>
    
    </nav>
    

    An error occurred

    Could not find acceptable representation
    <div class="info">
        
            
            
                <a href="https://www.castlemock.com" target="_blank">Castle Mock version. 1.16</a>
            
        
    </div>
    
    --------------------

    Global configuration for server invoke URL

    Allow the user to configure a global invoke URL. The URL will be used instead of the local IP address when displaying the address to either the SOAP or REST service. This scenario is helpful if you have deployed the server on a public domain, or have a proxy in front the server. In those cases you don't want to display your local IP, but another address.

    Add support to both encode and decode HTTP content encodings

    This particular feature is mostly interesting when forwarding and recording responses. The forwarding endpoint can use a content encoding. Castle Mock should be able to interpret it, but also produce responses with a particular encoding.

    Export projects on the overview page does not work in Chrome

    Chrome does not recognize that a file is about to be downloaded when exporting projects on the overview page. Instead, a new window is opened and shows the content of the file (Unreadable). The user should get a download window and a proper zip file should be downloaded.

    RAML support

    Castle Mock should allow the user to import RAML files, which can be used to create and define a REST interface.

    Add support to record REST services

    The user should be able to create an REST application and configure it to recording. The recording mode should create a new REST service for each incoming REST request that doesn't already match a REST service.

    REST API To Import Project to castlemock

    We want to create a script to install the docker version of castlemock, and then import a pre-defined project to the container instance. More broadly, are there REST endpoints to perform some of the functions that are done via the provided UI?

    Thank you

    SOAP Fault Response Recording

    Hi ,

    When any SOAP WS is returning soap:Fault the castle mock is not able to record the response .

    Sometime SOAP WS will return a soap:Fault with Body that need to be recorded .

    Can we fix it or there is any configuration can be change to make this awesome tools to record even when there is a soap fault ?

    Mocked Swagger methods are missing name on missing operation id

    Castle Mock is using the operation id defined within the Swagger definition to mock its REST methods. However, sometime this operation id can be missing. In those cases, the summery should be used as a name. If the summer is missing, then the method should be named after the HTTP method (GET, POST, PUT and so on).

    On demand downloadable artifacts

    What I am seeking is to be able to download the war file after successful travis-ci build.

    For Example, I need to download the war file as the result of this successful build: https://travis-ci.org/castlemock/castlemock/builds/341556514

    Or even to request a build on a specific git(hub) commit and then download the artifacts and use it. (so I don't need to wait for the official release to use the feature)

    What is your input regarding this?

    Similar to https://docs.travis-ci.com/user/deployment/releases/ but without uploading it to github, just give me a link to download it from travis itself.

    Swagger support

    Castle Mock should allow the user to import Swagger files which can be used to create and define a REST interface.

    Add new SoapResponseStrategy to help in predetermined test cases

    Thanks for your work, really amazing.

    I need to write some Integration test cases depending on castlemock, so that my application will call castelmock to return different each time for the same specific web service operation.

    The point is, I cannot depend on both the existing SoapResponseStrategy strategies (RANDOM and SEQUENCE), I cannot depend on RANDOM because my test cases need to know the result ahead so I could assert my code, and I cannot depend on SEQUENCE for many reasons one of them it is not a good idea to have test cases run in a certain order, they should run independently.

    The suggested solution is to return different mock responses based on different input (XPath could used here).

    BTW, SoapOperationStatus.ECHO is not helpful hence my application is sending real SOAP request message, and if I changed it to send some SOAP response to get it back in the request, I then changing in actual application code.

    Thanks.

    Update font

    The current font being used, Roboto, looks weird on Windows machines. Should be updated to it looks a little bit nicer.

    Remove logs related to a service when it is removed

    The logs for a service should be removed if the service is removed. However, it should be optional if the logs should be removed or not. The user should have an option if they want to remove the logs or not.

    Create a navigation bar

    Add a navigation bar to make it easier to navigate through REST and SOAP projects and their resources.

    Unable to delete application

    Using latest Docker release.

    Steps to reproduce:

    1. Create Project
    2. Add WADL
    3. Delete the generated application

    In case it helps, the WADL file I'm using can be obtained from: https://github.com/bumpmann/wadl-library/blob/master/twilio/twilio-wadl.xml

    Stacktrace:

    ERROR: com.castlemock.web.basis.web.mvc.controller.ViewControllerAdvice - The following request failed: /castlemock/web/rest/project/Kk1gY1/application/delete/confirm (POST)
    ERROR: com.castlemock.web.basis.web.mvc.controller.ViewControllerAdvice - 
    java.lang.UnsupportedOperationException
        at java.util.concurrent.CopyOnWriteArrayList$COWIterator.remove(CopyOnWriteArrayList.java:1176)
        at com.castlemock.web.mock.rest.model.project.repository.RestProjectRepositoryImpl.deleteRestApplication(RestProjectRepositoryImpl.java:572)
        at com.castlemock.web.mock.rest.model.project.repository.RestProjectRepositoryImpl$$FastClassBySpringCGLIB$$8542dc74.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
        at com.castlemock.web.mock.rest.model.project.repository.RestProjectRepositoryImpl$$EnhancerBySpringCGLIB$$c73aa193.deleteRestApplication(<generated>)
        at com.castlemock.web.mock.rest.model.project.service.DeleteRestApplicationsService.process(DeleteRestApplicationsService.java:45)
        at com.castlemock.web.basis.service.ServiceProcessorImpl.process(ServiceProcessorImpl.java:76)
        at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at com.sun.proxy.$Proxy40.process(Unknown Source)
        at com.castlemock.web.mock.rest.web.mvc.controller.application.DeleteRestApplicationController.confirmDeletationOfMultpleProjects(DeleteRestApplicationController.java:66)
        at com.castlemock.web.mock.rest.web.mvc.controller.application.DeleteRestApplicationController$$FastClassBySpringCGLIB$$d776285a.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:68)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
        at com.castlemock.web.mock.rest.web.mvc.controller.application.DeleteRestApplicationController$$EnhancerBySpringCGLIB$$64249bdd.confirmDeletationOfMultpleProjects(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:817)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:731)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:870)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:157)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:120)
        at org.springframework.boot.context.web.ErrorPageFilter.access$000(ErrorPageFilter.java:61)
        at org.springframework.boot.context.web.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:95)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:113)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2508)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2497)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
    

    I can delete the application by deleting the entire project, though. It's not really a big deal for me since there is only the one application in my project.

    WSDLs with XSD does not work

    When I try to upload a few files (WSDL, WSDL to be imported via wsdl:import, XSD) then I see files uploaded into /soap/resources/wsdl with extension *.rsc but all the files have the same content.

    It looks like the last file is copied many times.

    Retrieve WSDL file

    Add support to retrieve an uploaded WSDL file for a mocked project.
    The WSDL file should be retrieved by adding ?wsdl to the invoke adress.

    how can I import WSDL with xsd imports?

    Hi,

    Thank you for such a great tool. I'm just facing an issue related to a special WSDL with xsd:import and xsd:include that aren't imported and the mocks servers don't work.

    Is there a way to import the imports and includes somehow?

    Thanks,

    Add support for value generator

    A response should be able to contain one or more generated values. For example, a response can contain the following text: {RANDOM_INT}. This will generate a new random integer.

    typo in "Upload WADL"

    Environment

    version: 1.15
    deployment: docker

    Error

    GET http://[HOST]:8080/castlemock/resources/js/fileUpload.js 404

    Cause

    The js file cannot be retrieved because the link to this file has a typo.

    Fix

    The link should be "resource/js/FileUpload.js".

    Is castlemock generates responses from swagger based on $ref definitions?

    Hi, first - thank you for server - it seems very amazing and I'm looking forward use it in our new project.

    Here is example of issue:

          "/items/stock":{
             "get":{
                "responses":{
                   "200":{
                      "description":"OK",
                      "headers":[
                         "application/json"
                      ],
                      "schema":{
                         "type":"object",
                         "properties":{
                            "data":{
                               "$ref":"#/definitions/Item"
                            }
                         }
                      }
                   }
                },
                "summary":"Get a list of Items in stock",
                "description":"Provides a list of items in stock.",
                "tags":[
                   "List of Items in stock"
                ],
                "parameters":[
                   {
                      "name":"model_number",
                      "in":"query",
                      "description":"Filter by model number of item added in Transport Requests.",
                      "required":false,
                      "type":"number"
                   },
                   {
                      "name":"stock_number",
                      "in":"query",
                      "description":"Filter by number of item added in Transport Requests.",
                      "required":false,
                      "type":"number"
                   },
                   {
                      "name":"item_name",
                      "in":"query",
                      "description":"Filter by item name. Case insensitive. Provides partial matching search.",
                      "required":false,
                      "type":"string"
                   },
                   {
                      "name":"limit",
                      "in":"query",
                      "description":"Apply limit on items list. Applied by default.",
                      "required":false,
                      "type":"number",
                      "format":"int32",
                      "default":10,
                      "example":20,
                      "minimum":10,
                      "maximum":100
                   },
                   {
                      "name":"offset",
                      "in":"query",
                      "description":"Apply offset on items list (for pagination purposes). Applied by default.",
                      "required":false,
                      "type":"number",
                      "format":"int32",
                      "default":0
                   }
                ],
                "produces":[
                   "application/json"
                ],
                "consumes":[
                   "application/json"
                ]
             }
          },

    Unable to upload files to the server on certain browsers

    The method MultipartFile#getOriginalFilename is used to name an uploaded file on the server. The problem is that the method is acting differently depending on which browser is being used. This is what the method documentation says: "This may contain path information depending on the browser used, but it typically will not with any other than Opera.".

    Instead of using the original name, Castle Mock should use a temporary file name.

    Convert the mocking strategy to mock when the target WS is down

    usually, we mock some services in "Recording" mock, and at random times we go the target service down, is it possible to make activate the "Mock" strategy when the target service is down?

    Here's an overview of what we needs issue_#52.zip

    However my purposed solution is not smart enough, it whould be very easy and intutuive to use (if we add some hint about what FALLBACK exactly is).

    if we did a more smart solution (user can decorate current strategy either forward for record or record once, etc.. with a FALLBACK strategy) but it would be hard for the user to use it.

    What do you think?

    New method status: Echo

    The mocked services can be configured to simply echo the incoming request. The response will echo both the incoming body and the content-type.

    Create a system page

    A new administrator page named "System" should be created. The page should display information about the current system that Castle Mock is being hosted on.

    Does Castle Mock support MTOM request?

    I'm trying to sending a mtom request to WSDL that i have but i keeping getting this error below:

    <error-response>
       <error-message>getInputStream() has already been called for this request</error-message>
    </error-response>
    

    On log i not see any error.

    Add clear logs functionality

    An administrator should have the ability to remove and clear all the logs presented in the log page. A button should be present in the right corners for administrators. Clicking on the button will clear all the logs from the server.

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google โค๏ธ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.