Comments (3)
It seems that both file format and text format are working fine with simple requests and responses. But I don't know if it can handle SOAP services for more complex scenarios / requests. Do you have any comment / news on it?
#users.json file:
[
{
"id": "get-users",
"url": "/api/users",
"method": "GET",
"variants": [
{
"id": "success",
"type": "json",
"options": {
"status": 200,
"body": [
{
"id": 1,
"name": "my name"
},
{
"id": 2,
"name": "my brother's name"
}
]
}
},
{
"id": "xml-sample-with-file",
"type": "file",
"options": {
"status": 200,
"path": "mocks/routes/xml-sample.xml"
}
},
{
"id": "xml-sample-with-text",
"type": "text",
"options": {
"status": 200,
"headers": {
"Content-type": "application/xml"
},
"body": "<note>\n<to>Tove</to>\n<from>Jani</from>\n<heading>Reminder</heading>\n<body>Don't forget me this weekend!</body>\n</note>"
}
}
]
}
]
#collections.json file:
[
{
"id": "base",
"routes": ["get-users:xml-sample-with-text"]
}
]
from main.
Hi @jobe451 , I don't know much about SOAP, but I suppose that you could simulate it with mocks-server if the protocol is HTTP. You could send XML responses using the text
route variants.
Anyway, I will let this issue opened in order to investigate further about how to provide a better support and documentation for SOAP services.
from main.
Hi @EmreCihanbeyoglu ,
Could you be more specific about the "more complex scenarios / requests" that you need to handle?
from main.
Related Issues (20)
- Auto generate doesn't work HOT 8
- Configure mocks-server as a gitlab "service" HOT 2
- Support JSDOM testenvironment HOT 1
- File watch mode doesn't work in docker HOT 1
- EsBuild suport HOT 1
- Paths with two parameters return message - 404 Not found HOT 1
- MOCKS_SERVER_PLUGINS_ADMIN_API_PORT env has no effect HOT 1
- Fixes for vulnerabilities in yaml, minimist and got dependencies HOT 1
- Check the amount of specific route:variant are called HOT 9
- Error resolving openapi $ref: JSON Pointer points to missing location: #/components/schemas/Pet HOT 2
- OpenAPI: support generating variants from examples in response schemas HOT 4
- OpenAPI: Variants are not generated for responses with a single `example` key HOT 4
- Adding cypress commands throw webpack error: Can't resolve 'node:buffer' HOT 4
- quicktype for automated mocks? HOT 1
- Alert about not loaded files in routes folder HOT 5
- OpenAPI remote example failing due to stringified json HOT 1
- Babel configuration ignored in docker container HOT 7
- Problems with Query Params path-to-regexp HOT 1
- File collections.json cannot be found when it is in the CWD HOT 1
- Import mockjs or other modules
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from main.