entaxy-public/documentation/connectors/uniform-exchange-service/tests/postman/uniform-connector.postman_c...

1396 lines
43 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"info": {
"_postman_id": "0c9cdab7-0764-42b8-a9d1-a11945d7af2a",
"name": "uniform-connector",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "uniform-exchange",
"item": [
{
"name": "settings esb",
"item": [
{
"name": "Create profile system1",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var jsonObject = xml2Json(responseBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/xml",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <sys:createProfileRequest>\n <sys:profileName>{{system1_id}}</sys:profileName>\n <sys:uuid>{{system1_id}}</sys:uuid>\n <!--Optional:-->\n <sys:description>description1</sys:description>\n </sys:createProfileRequest>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/system-management",
"host": [
"{{base_url}}"
],
"path": [
"system-management"
]
}
},
"response": []
},
{
"name": "Create profile system2",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var jsonObject = xml2Json(responseBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/xml",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <sys:createProfileRequest>\n <sys:profileName>{{system2_id}}</sys:profileName>\n <sys:uuid>{{system2_id}}</sys:uuid>\n <!--Optional:-->\n <sys:description>description2</sys:description>\n </sys:createProfileRequest>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/system-management",
"host": [
"{{base_url}}"
],
"path": [
"system-management"
]
}
},
"response": []
},
{
"name": "Add Account system1",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var soapBody = responseBody.match(/<soap:Envelope[\\s\\S]*soap:Envelope>/g);",
" var jsonObject = xml2Json(soapBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/xml",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:bas=\"http://www.entaxy.ru/basic-auth-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <bas:accountList>\n <!--1 or more repetitions:-->\n <bas:account>\n <bas:login>{{system1Login}}</bas:login>\n <bas:password>{{system1Password}}</bas:password>\n <!--Optional:-->\n <bas:systemUUID>{{system1_id}}</bas:systemUUID>\n <!--Optional:-->\n <bas:systemName>{{system1_id}}</bas:systemName>\n </bas:account>\n </bas:accountList>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/basic-auth-management",
"host": [
"{{base_url}}"
],
"path": [
"basic-auth-management"
]
}
},
"response": []
},
{
"name": "Add Account system2",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var soapBody = responseBody.match(/<soap:Envelope[\\s\\S]*soap:Envelope>/g);",
" var jsonObject = xml2Json(soapBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/xml",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:bas=\"http://www.entaxy.ru/basic-auth-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <bas:accountList>\n <!--1 or more repetitions:-->\n <bas:account>\n <bas:login>{{system2Login}}</bas:login>\n <bas:password>{{system2Password}}</bas:password>\n <!--Optional:-->\n <bas:systemUUID>{{system2_id}}</bas:systemUUID>\n <!--Optional:-->\n <bas:systemName>{{system2_id}}</bas:systemName>\n </bas:account>\n </bas:accountList>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/basic-auth-management",
"host": [
"{{base_url}}"
],
"path": [
"basic-auth-management"
]
}
},
"response": []
},
{
"name": "Create uniform-service-in-connector",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var jsonObject = xml2Json(responseBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/xml",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <sys:createConnectorRequest>\n <sys:templateName>uniform-service-in-connector</sys:templateName>\n <sys:profileUuid>{{system1_id}}</sys:profileUuid>\n <sys:paramList>\n <!--Zero or more repetitions:-->\n </sys:paramList>\n </sys:createConnectorRequest>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/system-management",
"host": [
"{{base_url}}"
],
"path": [
"system-management"
]
}
},
"response": []
},
{
"name": "Create uniform-service-out-connector",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var jsonObject = xml2Json(responseBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/xml"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <sys:createConnectorRequest>\n <sys:templateName>uniform-service-out-connector</sys:templateName>\n <sys:profileUuid>{{system2_id}}</sys:profileUuid>\n <sys:paramList>\n <!--Zero or more repetitions:-->\n </sys:paramList>\n </sys:createConnectorRequest>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/system-management",
"host": [
"{{base_url}}"
],
"path": [
"system-management"
]
}
},
"response": []
},
{
"name": "Create uniform-service-in-connector",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var jsonObject = xml2Json(responseBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/xml"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <sys:createConnectorRequest>\n <sys:templateName>uniform-service-in-connector</sys:templateName>\n <sys:profileUuid>{{system2_id}}</sys:profileUuid>\n <sys:paramList>\n <!--Zero or more repetitions:-->\n </sys:paramList>\n </sys:createConnectorRequest>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/system-management",
"host": [
"{{base_url}}"
],
"path": [
"system-management"
]
}
},
"response": []
},
{
"name": "Get profile system1",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"var systemId = pm.environment.get(\"system1_id\");",
"",
"pm.test(\"Body matches \" + systemId, function () {",
" pm.expect(pm.response.text()).to.include(systemId);",
"});",
"",
"function getSoapBody() {",
" var jsonObject = xml2Json(responseBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/xml"
},
{
"key": "X-ForwardedUser",
"value": "{{adminLogin}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <sys:getProfileRequest>\n <sys:uuid>{{system1_id}}</sys:uuid>\n </sys:getProfileRequest>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/system-management",
"host": [
"{{base_url}}"
],
"path": [
"system-management"
]
},
"description": "Проверить созданный профиль можно с помощью метода getProfile, где вместо “system_uuid” нужно подставить uuid системы\n"
},
"response": []
},
{
"name": "Get profile system2",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"var systemId = pm.environment.get(\"system2_id\");",
"",
"pm.test(\"Body matches \" + systemId, function () {",
" pm.expect(pm.response.text()).to.include(systemId);",
"});",
"",
"function getSoapBody() {",
" var jsonObject = xml2Json(responseBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/xml"
},
{
"key": "X-ForwardedUser",
"value": "{{adminLogin}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <sys:getProfileRequest>\n <sys:uuid>{{system2_id}}</sys:uuid>\n </sys:getProfileRequest>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/system-management",
"host": [
"{{base_url}}"
],
"path": [
"system-management"
]
},
"description": "Проверить созданный профиль можно с помощью метода getProfile, где вместо “system_uuid” нужно подставить uuid системы\n"
},
"response": []
},
{
"name": "Create permission",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var jsonObject = xml2Json(responseBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});",
"",
"setTimeout(function(){}, 5000);",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/xml",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <sys:createPermissionRequest>\n <sys:objectUuid>{{system1_id}}</sys:objectUuid>\n <sys:subjectUuid>{{system2_id}}</sys:subjectUuid>\n </sys:createPermissionRequest>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/system-management",
"host": [
"{{base_url}}"
],
"path": [
"system-management"
]
}
},
"response": []
}
]
},
{
"name": "uniform-exchange-connector",
"item": [
{
"name": "SEND",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"function getSoapBody() {",
" var soapBody = responseBody.match(/<soap:Envelope[\\s\\S]*soap:Envelope>/g);",
" var jsonObject = xml2Json(soapBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is OK\", function () {",
" var response = getSoapBody();",
" pm.expect(response['response']['status']).to.eql('200');",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{system1Password}}",
"type": "string"
},
{
"key": "username",
"value": "{{system1Login}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/xml; charset=UTF-8",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.entaxy.ru/ExchangeTypes/1.0\">\n <soapenv:Header/>\n <soapenv:Body>\n <ns:packets>\n <ns:packet>\n \t<ns:header>\n \t\t<ns:destination>\n \t<ns:id>{{system2_id}}</ns:id>\n \t</ns:destination>\n \t</ns:header>\n <ns:message>\n <ns:messageUUID>b7e6aab7-8f02-443c-8f67-e2d638dd4da0</ns:messageUUID>\n <ns:source>\n <ns:id>{{system1_id}}</ns:id>\n </ns:source>\n <ns:customHeader>\n <ns:id>RequestNumber</ns:id>\n <ns:value>111</ns:value>\n </ns:customHeader>\n <ns:customHeader>\n <ns:id>test1</ns:id>\n <ns:type>test1</ns:type>\n <ns:value>val</ns:value>\n </ns:customHeader>\n <ns:content>\n\t \t\t<test>\n\t \t\t<hello/>\n\t \t</test>\n\t </ns:content>\n </ns:message>\n </ns:packet>\n </ns:packets>\n </soapenv:Body>\n</soapenv:Envelope>\n"
},
"url": {
"raw": "{{base_url}}/uniform-exchange",
"host": [
"{{base_url}}"
],
"path": [
"uniform-exchange"
]
}
},
"response": []
},
{
"name": "GET",
"event": [
{
"listen": "test",
"script": {
"exec": [
"function getSoapBody() {",
" var soapBody = responseBody.match(/<soap:Envelope[\\s\\S]*soap:Envelope>/g);",
" var jsonObject = xml2Json(soapBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"var response = getSoapBody();",
"",
"pm.test(\"Has service response\", function () {",
" pm.expect(response).to.have.property('response');",
"});",
"",
"if (response.hasOwnProperty('response')) {",
" var packet = response['response']['packets']['packet'];",
"",
" var header = packet['header'];",
" ",
" var message_id = header['transportUUID'];",
" ",
" console.log(packet['message']['content']);",
" console.log(message_id);",
" ",
" pm.globals.set('message_uuid', message_id);",
" ",
" pm.test(\"Content is OK\", function () {",
" pm.expect(packet['message']['content']).to.be.an('object');",
" });",
" ",
" pm.test(\"message_id is OK\", function () {",
" pm.expect(message_id).to.have.lengthOf(36);",
" });",
"}"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{system2Password}}",
"type": "string"
},
{
"key": "username",
"value": "{{system2Login}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/xml; charset=UTF-8"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.entaxy.ru/ExchangeTypes/1.0\">\r\n <soapenv:Header/>\r\n <soapenv:Body>\r\n <ns:getPacketsRequest>\r\n <ns:destination>\r\n <ns:id>{{system2_id}}</ns:id>\r\n <ns:type>system.name</ns:type>\r\n </ns:destination>\r\n <ns:limitCount>1</ns:limitCount>\r\n <ns:limitSize>0</ns:limitSize>\r\n </ns:getPacketsRequest>\r\n </soapenv:Body>\r\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/uniform-exchange",
"host": [
"{{base_url}}"
],
"path": [
"uniform-exchange"
]
}
},
"response": []
},
{
"name": "ACK",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"function getSoapBody() {",
" var soapBody = responseBody.match(/<soap:Envelope[\\s\\S]*soap:Envelope>/g);",
" var jsonObject = xml2Json(soapBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is 200\", function () {",
" var response = getSoapBody();",
" pm.expect(response['response']['status']).to.eql('200');",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{system2Password}}",
"type": "string"
},
{
"key": "username",
"value": "{{system2Login}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/xml; charset=UTF-8"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.entaxy.ru/ExchangeTypes/1.0\">\r\n <soapenv:Header/>\r\n <soapenv:Body>\r\n <ns:uuids>\r\n <ns:uuid>{{message_uuid}}</ns:uuid>\r\n </ns:uuids>\r\n </soapenv:Body>\r\n</soapenv:Envelope>\r\n"
},
"url": {
"raw": "{{base_url}}/uniform-exchange",
"host": [
"{{base_url}}"
],
"path": [
"uniform-exchange"
]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "clean esb",
"item": [
{
"name": "Remove profile system1",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var jsonObject = xml2Json(responseBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/xml",
"type": "text"
},
{
"key": "X-ForwardedUser",
"value": "{{adminLogin}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <sys:removeProfileRequest>\n <sys:uuid>{{system1_id}}</sys:uuid>\n </sys:removeProfileRequest>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/system-management",
"host": [
"{{base_url}}"
],
"path": [
"system-management"
]
}
},
"response": []
},
{
"name": "Remove profile system2",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var jsonObject = xml2Json(responseBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/xml",
"type": "text"
},
{
"key": "X-ForwardedUser",
"value": "{{adminLogin}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <sys:removeProfileRequest>\n <sys:uuid>{{system2_id}}</sys:uuid>\n </sys:removeProfileRequest>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/system-management",
"host": [
"{{base_url}}"
],
"path": [
"system-management"
]
}
},
"response": []
},
{
"name": "Remove Account system1",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var soapBody = responseBody.match(/<soap:Envelope[\\s\\S]*soap:Envelope>/g);",
" var jsonObject = xml2Json(soapBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/xml",
"type": "text"
},
{
"key": "X-ForwardedUser",
"value": "{{adminLogin}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:bas=\"http://www.entaxy.ru/basic-auth-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <bas:loginList>\n <!--1 or more repetitions:-->\n <bas:login>{{system1_id}}</bas:login>\n </bas:loginList>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/basic-auth-management",
"host": [
"{{base_url}}"
],
"path": [
"basic-auth-management"
]
}
},
"response": []
},
{
"name": "Remove Account system2",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches true\", function () {",
" pm.expect(pm.response.text()).to.include(\"true\");",
"});",
"",
"function getSoapBody() {",
" var soapBody = responseBody.match(/<soap:Envelope[\\s\\S]*soap:Envelope>/g);",
" var jsonObject = xml2Json(soapBody);",
" return jsonObject['soap:Envelope']['soap:Body'];",
"}",
"",
"pm.test(\"Response is true\", function () {",
" var response = getSoapBody();",
" pm.expect(response.response._).to.eql('true');",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{adminPassword}}",
"type": "string"
},
{
"key": "username",
"value": "{{adminLogin}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/xml",
"type": "text"
},
{
"key": "X-ForwardedUser",
"value": "{{adminLogin}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:bas=\"http://www.entaxy.ru/basic-auth-service/\">\n <soapenv:Header/>\n <soapenv:Body>\n <bas:loginList>\n <!--1 or more repetitions:-->\n <bas:login>{{system2_id}}</bas:login>\n </bas:loginList>\n </soapenv:Body>\n</soapenv:Envelope>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{base_url}}/basic-auth-management",
"host": [
"{{base_url}}"
],
"path": [
"basic-auth-management"
]
}
},
"response": []
}
]
}
],
"description": "для тестирования нужно добавть в environment: system1_id, system2_id",
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
}
]
}