initial public commit
This commit is contained in:
462
documentation/core/schema/Schema.adoc
Normal file
462
documentation/core/schema/Schema.adoc
Normal file
@ -0,0 +1,462 @@
|
||||
= Shema
|
||||
|
||||
Есть три типа ресурсов, которые можно загружать в шину и использовать в маршрутах:
|
||||
|
||||
. Валидационные типы ресурсов (нпрм xsd). Необходимы для валидации сообщения на соответствие той или иной схеме.
|
||||
. Трансформационные типы ресурсов (нпрм xslt, amd). Необходимы для трасформации сообщений из одной схемы в другую.
|
||||
. Ресурсы используемые для генерации сервисов (нпрм wsdl). Необходимы для поднятия сервиса на шине.
|
||||
|
||||
Для загрузки трансформационных ресурсов необходимо указывать, является ли данный трансформатор конвертором и схему-источник и схему-результат для неявного преобразования сообщения(конвертор может быть один и только один для пары: схема источник, схема результат)
|
||||
Схему-источник и схему-результат необходимо указывать только для конверторов, используемых в неявных преобразованиях
|
||||
|
||||
Желательно указывать или определять схему для коннектора, если предполагается использовать функционал неявных преобразований. Неявное преобразование будет работать, если:
|
||||
|
||||
- в заголовке указана схема-источник
|
||||
- в заголовке указана схема-приемник
|
||||
- в реестре есть конвертор для этой пары схем
|
||||
|
||||
Указание схемы может попадать в заголовок неявно (из свойств коннектора или из тела сообщения) или явно через медиатор.
|
||||
|
||||
== Схема работы с ресурсами.
|
||||
|
||||
Сначала загружаем сам ресурс в шину, который мы будем использовать в маршрутах.
|
||||
|
||||
Загружаем ресурс и получаем id, с помощью которого можно и _нужно_ добавить служебную информацию!
|
||||
Также можно перезагрузить данный ресурс и удалять его из шины.
|
||||
|
||||
Также можно загружать служебную информацию, такую как название ресурса, его расширение и т д.
|
||||
Выгружать весь список ресурсов, и по отдельности выкачивать сам ресурс для анализа.
|
||||
Также использовать различные сортировки для поиска определенного типа ресурс.
|
||||
|
||||
== Руководство по загрузке ресурсов в шину.
|
||||
|
||||
*LoadResource.*
|
||||
|
||||
Для загрузки ресурса в шину нужно использовать метод loadResource.
|
||||
|
||||
параметры:
|
||||
|
||||
- resourceValue - сам ресурс, в формате base64
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://www.entaxy.ru/registry-schema-service/">
|
||||
<soapenv:Body>
|
||||
<reg:loadResourceRequest>
|
||||
<reg:resourceValue></reg:resourceValue>
|
||||
</reg:loadResourceRequest>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
||||
----
|
||||
|
||||
ответ
|
||||
[source,xml]
|
||||
----
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<response xmlns="http://www.entaxy.ru/registry-schema-service/">1</response>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
----
|
||||
|
||||
*GetResource.*
|
||||
|
||||
Для выгрузки заранее загруженного ресурса в шину нужно использовать метод getResource.
|
||||
|
||||
параметры:
|
||||
|
||||
- getResourceRequest - id ресурса, который вернулся при вызове метода LoadResource
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://www.entaxy.ru/registry-schema-service/">
|
||||
<soapenv:Header/>
|
||||
<soapenv:Body>
|
||||
<reg:getResourceRequest>1</reg:getResourceRequest>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
||||
----
|
||||
|
||||
ответ
|
||||
|
||||
параметры:
|
||||
|
||||
- id - это id ресурса
|
||||
- createdDate - дата создания ресурса
|
||||
- createdBy - логин, загрузивший ресурс в шину
|
||||
- editedDate - дата перезагрузки ресурса
|
||||
- editedBy - логин, перезагрузивший ресурс в шине
|
||||
- resourceValue - сам ресурс, в формате base64
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<FullResourceType xmlns="http://www.entaxy.ru/registry-schema-service/">
|
||||
<id>1</id>
|
||||
<createdDate>12/15/20, 1:11 AM</createdDate>
|
||||
<createdBy>12/15/20, 1:11 AM</createdBy>
|
||||
<editedDate>12/15/20, 1:18 AM</editedDate>
|
||||
<editedBy>12/15/20, 1:18 AM</editedBy>
|
||||
<resourceValue></resourceValue>
|
||||
</FullResourceType>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
----
|
||||
|
||||
*ReloadResource.*
|
||||
|
||||
Для перезагрузки ресурса в шину есть метод reloadResource.
|
||||
|
||||
параметры:
|
||||
|
||||
- id - id ресурса, который вернулся при вызове метода LoadResource
|
||||
- resourceValue - сам ресурс, в формате base64
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://www.entaxy.ru/registry-schema-service/">
|
||||
<soapenv:Body>
|
||||
<reg:ResourceType>
|
||||
<reg:id>1</reg:id>
|
||||
<reg:resourceValue></reg:resourceValue>
|
||||
</reg:ResourceType>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
||||
----
|
||||
|
||||
ответ
|
||||
[source,xml]
|
||||
----
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<response xmlns="http://www.entaxy.ru/registry-schema-service/">1</response>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
----
|
||||
|
||||
*RemoveResource.*
|
||||
|
||||
Для удаления ресурса в шине есть метод removeResource.
|
||||
|
||||
параметры:
|
||||
|
||||
- id - id ресурса, который вернулся при вызове метода LoadResource
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://www.entaxy.ru/registry-schema-service/">
|
||||
<soapenv:Header/>
|
||||
<soapenv:Body>
|
||||
<reg:removeResourceRequest>1</reg:removeResourceRequest>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
||||
----
|
||||
|
||||
ответ
|
||||
[source,xml]
|
||||
----
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<response xmlns="http://www.entaxy.ru/registry-schema-service/">1</response>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
----
|
||||
|
||||
*LoadResourceInfo.*
|
||||
|
||||
Для загрузки мета информации ресурса в шине есть метод loadResourceInfo.
|
||||
|
||||
параметры:
|
||||
|
||||
- idResource - id ресурса, который вернулся при вызове метода LoadResource
|
||||
- name - имя ресурса вместе с расширением
|
||||
- version - версия ресурса
|
||||
- description - описание ресурса
|
||||
- convertor - является ли ресурс конвертором из одной схемы в другую
|
||||
- namespace - входное пространство имен
|
||||
- namespaceOut - выходное пространство имен, используется для трансформаций из одной схемы в другую
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://www.entaxy.ru/registry-schema-service/">
|
||||
<soapenv:Body>
|
||||
<reg:loadResourceInfoRequest>
|
||||
<reg:name>lama.xsd</reg:name>
|
||||
<reg:idResource>1</reg:idResource>
|
||||
<reg:version>1.0</reg:version>
|
||||
<reg:description>lama test</reg:description>
|
||||
<reg:convertor>false</reg:convertor>
|
||||
<reg:namespace>http:lama.xsd</reg:namespace>
|
||||
<reg:namespaceOut>l</reg:namespaceOut>
|
||||
</reg:loadResourceInfoRequest>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
||||
----
|
||||
|
||||
ответ
|
||||
[source,xml]
|
||||
----
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<response xmlns="http://www.entaxy.ru/registry-schema-service/">1</response>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
----
|
||||
|
||||
*GetResourceInfo.*
|
||||
|
||||
Для получения мета информации ресурса в шине есть метод getResourceInfo.
|
||||
|
||||
параметры:
|
||||
|
||||
- getResourceInfoRequest - id мета информации ресурса, который вернулся при вызове метода LoadResourceInfo
|
||||
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://www.entaxy.ru/registry-schema-service/">
|
||||
<soapenv:Header/>
|
||||
<soapenv:Body>
|
||||
<reg:getResourceInfoRequest>1</reg:getResourceInfoRequest>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
||||
----
|
||||
|
||||
ответ
|
||||
|
||||
параметры:
|
||||
|
||||
- id - id мета информации ресурса, который вернулся при вызове метода LoadResourceInfo
|
||||
- idResource - id ресурса, который вернулся при вызове метода LoadResource
|
||||
- name - имя ресурса вместе с расширением
|
||||
- version - версия ресурса
|
||||
- description - описание ресурса
|
||||
- convertor - является ли ресурс конвертором из одной схемы в другую
|
||||
- namespace - входное пространство имен
|
||||
- namespaceOut - выходное пространство имен, используется для трансформаций из одной схемы в другую
|
||||
- createdDate - дата создания мета информации ресурса
|
||||
- createdBy - логин, загрузивший мета информацию ресурса в шину
|
||||
- editedDate - дата перезагрузки мета информации ресурса
|
||||
- editedBy - логин, перезагрузивший мета информацию ресурса в шине
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<getResourceInfoResponse xmlns="http://www.entaxy.ru/registry-schema-service/">
|
||||
<id>14</id>
|
||||
<name>lama.xsd</name>
|
||||
<idResource>14</idResource>
|
||||
<version>1.0</version>
|
||||
<description>lama test</description>
|
||||
<convertor>false</convertor>
|
||||
<namespace>http:lama.xsd</namespace>
|
||||
<namespaceOut>false</namespaceOut>
|
||||
<createdBy>?</createdBy>
|
||||
<createdDate>12/15/20, 1:33 AM</createdDate>
|
||||
<editedBy>?</editedBy>
|
||||
<editedDate>12/15/20, 1:35 AM</editedDate>
|
||||
</getResourceInfoResponse>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
----
|
||||
|
||||
*EditResourceInfo.*
|
||||
|
||||
Для корректирования мета информации ресурса в шине есть метод еditResourceInfo.
|
||||
|
||||
параметры:
|
||||
|
||||
- id - id мета информации ресурса, который вернулся при вызове метода LoadResourceInfo
|
||||
- idResource - id ресурса, который вернулся при вызове метода LoadResource
|
||||
- name - имя ресурса вместе с расширением
|
||||
- version - версия ресурса
|
||||
- description - описание ресурса
|
||||
- convertor - является ли ресурс конвертором из одной схемы в другую
|
||||
- namespace - входное пространство имен
|
||||
- namespaceOut - выходное пространство имен, используется для трансформаций из одной схемы в другую
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://www.entaxy.ru/registry-schema-service/">
|
||||
<soapenv:Body>
|
||||
<reg:editResourceInfoRequest>
|
||||
<reg:id>1</reg:id>
|
||||
<reg:name>lama.xsd</reg:name>
|
||||
<reg:idResource>1</reg:idResource>
|
||||
<reg:version>1.0</reg:version>
|
||||
<reg:description>lama test</reg:description>
|
||||
<reg:convertor>false</reg:convertor>
|
||||
<reg:namespace>http:lama.xsd</reg:namespace>
|
||||
<reg:namespaceOut>l</reg:namespaceOut>
|
||||
</reg:editResourceInfoRequest>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
||||
----
|
||||
|
||||
ответ
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<response xmlns="http://www.entaxy.ru/registry-schema-service/">14</response>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
----
|
||||
|
||||
*RemoveResourceInfo.*
|
||||
|
||||
Для удаления мета информации ресурса в шине есть метод removeResourceInfo.
|
||||
|
||||
параметры:
|
||||
|
||||
- id - id мета информации ресурса, который вернулся при вызове метода LoadResourceInfo
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://www.entaxy.ru/registry-schema-service/">
|
||||
<soapenv:Header/>
|
||||
<soapenv:Body>
|
||||
<reg:removeResourceInfoRequest>1</reg:removeResourceInfoRequest>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
||||
----
|
||||
|
||||
ответ
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<response xmlns="http://www.entaxy.ru/registry-schema-service/">1</response>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
----
|
||||
|
||||
*GetResourceInfoList.*
|
||||
|
||||
Для получения списка мета информации ресурсов в шине есть метод getResourceInfoList.
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://www.entaxy.ru/registry-schema-service/">
|
||||
<soapenv:Header/>
|
||||
<soapenv:Body>
|
||||
<reg:getResourceInfoListRequest/>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
||||
----
|
||||
|
||||
ответ
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<getResourceInfoListResponse xmlns="http://www.entaxy.ru/registry-schema-service/">
|
||||
<ResourceInfoFullType>
|
||||
<id>1</id>
|
||||
<name>lama.xsd</name>
|
||||
<idResource>1</idResource>
|
||||
<version>1.0</version>
|
||||
<description>lama test</description>
|
||||
<convertor>false</convertor>
|
||||
<namespace>http:lama.xsd</namespace>
|
||||
<namespaceOut>l</namespaceOut>
|
||||
<createdBy>?</createdBy>
|
||||
<createdDate>12/14/20, 10:00 PM</createdDate>
|
||||
</ResourceInfoFullType>
|
||||
</getResourceInfoListResponse>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
----
|
||||
|
||||
*GetResourceInfoListByName.*
|
||||
|
||||
Для получения списка мета информации ресурсов по имени ресурса в шине есть метод getResourceInfoListByName.
|
||||
|
||||
параметры:
|
||||
|
||||
- name - часть имени мета информации ресурса
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://www.entaxy.ru/registry-schema-service/">
|
||||
<soapenv:Header/>
|
||||
<soapenv:Body>
|
||||
<reg:getResourceInfoListByNameRequest>
|
||||
<reg:name>.xsd</reg:name>
|
||||
</reg:getResourceInfoListByNameRequest>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
||||
----
|
||||
|
||||
ответ
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<getResourceInfoListResponse xmlns="http://www.entaxy.ru/registry-schema-service/">
|
||||
<ResourceInfoFullType>
|
||||
<id>1</id>
|
||||
<name>lama.xsd</name>
|
||||
<idResource>1</idResource>
|
||||
<version>1.0</version>
|
||||
<description>lama test</description>
|
||||
<convertor>false</convertor>
|
||||
<namespace>http:lama.xsd</namespace>
|
||||
<namespaceOut>l</namespaceOut>
|
||||
<createdBy>?</createdBy>
|
||||
<createdDate>12/14/20, 10:00 PM</createdDate>
|
||||
</ResourceInfoFullType>
|
||||
</getResourceInfoListResponse>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
----
|
||||
|
||||
*GetResourceInfoListByNamespace.*
|
||||
|
||||
Для получения списка мета информации ресурсов по namespace ресурса в шине есть метод getResourceInfoListByNamespace.
|
||||
|
||||
параметры:
|
||||
|
||||
- namespace - часть namespace мета информации ресурса
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://www.entaxy.ru/registry-schema-service/">
|
||||
<soapenv:Header/>
|
||||
<soapenv:Body>
|
||||
<reg:getResourceInfoListByNamespaceRequest>
|
||||
<reg:namespace>lama</reg:namespace>
|
||||
</reg:getResourceInfoListByNamespaceRequest>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>
|
||||
----
|
||||
|
||||
ответ
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||
<soap:Body>
|
||||
<getResourceInfoListResponse xmlns="http://www.entaxy.ru/registry-schema-service/">
|
||||
<ResourceInfoFullType>
|
||||
<id>1</id>
|
||||
<name>lama.xsd</name>
|
||||
<idResource>1</idResource>
|
||||
<version>1.0</version>
|
||||
<description>lama test</description>
|
||||
<convertor>false</convertor>
|
||||
<namespace>http:lama.xsd</namespace>
|
||||
<namespaceOut>l</namespaceOut>
|
||||
<createdBy>?</createdBy>
|
||||
<createdDate>12/14/20, 10:00 PM</createdDate>
|
||||
</ResourceInfoFullType>
|
||||
</getResourceInfoListResponse>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
----
|
Reference in New Issue
Block a user