This sample backend represent a Legacy XML Backend which requires a header x-user
with the value admin
for
successfully process the request. Otherwise, it responds with 401
status code.
When it successfully inserted a book it responds with 200
status code with a text/plain
content.
- Docker
- Ballerina Swan Lake Beta 3
-
Build the backend service.
bal build --cloud=docker cc-sample-legacy-xml-backend/
-
Test the backend service.
docker run --name lagacy-backend -p 9080:9080 wso2am/cc-sample-legacy-xml-backend:v1.0.0
In another shell
curl -X POST http://localhost:9080/books \ -d '<name>The Prisoner</name>' \ -H 'x-user: admin' -v
Remove the container
docker rm -f lagacy-backend