Git Product home page Git Product logo

Comments (7)

karldahlgren avatar karldahlgren commented on May 29, 2024 2

Hi @oscarAtNava.
Sorry for the late response. I just finished releasing the latest version of Castle Mock (1.19). The release contain a new REST interface for importing projects and SOAP resources. It currently only has those two services, but I will add more in the upcoming releases. I just wanted to get this version released as soon as possible so that you weren't blocked.

The REST API can be viewed with Swagger UI. There is a link to the API in the Castle Mock footer, or you can go to the following page: {CastleMock}/doc/api/rest.

The services requires either modifier or admin authorization. Either a token or basic authentication can be used to authenticate.
For more information regarding basic authentication, please see the following page: https://en.wikipedia.org/wiki/Basic_access_authentication

In your scenario, you need to use both services to import everything. The exported project file does not contain the WSDL file. That one has to be added through the resource service.

Here are two examples on how to use the services. I hope you find them useful.

Import project example:
curl -X POST "http://localhost:8080/castlemock/api/rest/core/project/import?type=SOAP" -H "accept: */*" -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: multipart/form-data" -F "[email protected];type=text/xml"

Import WSDL example:
curl -X POST "http://localhost:8080/castlemock/api/rest/soap/resource?projectId=QrTaXl&resourceType=WSDL" -H "accept: */*" -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: multipart/form-data" -F "[email protected];type="

I hope that this will resolve your problem. I wish you the best of luck with your automated Castle Mock setup. Please feel free to contact me if you have any further questions, suggestions on improvements or if you simply want to tell me how the process is going. All feedback is appreciated. :)

Best regards,
Karl Dahlgren

from castlemock.

karldahlgren avatar karldahlgren commented on May 29, 2024

Hi @oscarAtNava.
Ironically, there isn’t a REST interface for Castle Mock. However, the whole infrastructure in Castle Mock is built in such a way that it would be easy to add a REST interface in the future. Up until this moment, it has been down prioritised. I was waiting for someone to request it. With that being said, it should be very easy to add these functionalities as a REST interface. If you want, I can add this to Castle Mock in the beginning of next week and then create a new release. How does that sound for you?

Would it be possible for you to provide a list of suggestions on which functionalities you would like the RESR interface to provide?

Thank you.
Best regards,
Karl Dahlgren

from castlemock.

oscarAtNava avatar oscarAtNava commented on May 29, 2024

from castlemock.

oscarAtNava avatar oscarAtNava commented on May 29, 2024

Thank you Karl, I will take the new version for a spin and let you know.

from castlemock.

karldahlgren avatar karldahlgren commented on May 29, 2024

Hi @oscarAtNava.
I just wanted to inform you that the upcoming release 1.20 will contain some minor modifications to the REST url. Instead of using request parameters for the identifiers, we will instead be using path parameters.

You will find all the available REST services in the Swagger page in Castle Mock. I hope that this doesn't cause too much problems for you. The functionality is still the same, but the URLs has changed a little bit.

Please contact me if you face any difficulties.

Best regards,
Karl Dahlgren

from castlemock.

oscarAtNava avatar oscarAtNava commented on May 29, 2024

from castlemock.

praveenkumar466 avatar praveenkumar466 commented on May 29, 2024

Could you please give me the rest api for import rest xml into the latest version of castlemock

from castlemock.

Related Issues (20)

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.