release version 1.10.0

This commit is contained in:
2024-12-14 04:07:49 +03:00
parent a5088587f7
commit c6b3d793c4
1916 changed files with 254306 additions and 0 deletions

View File

@ -0,0 +1,51 @@
{
"factory": {
"id": "uniform-active-exchange-connector-in",
"type": "entaxy.runtime.connector",
"displayName": "UNIFORM :: ACTIVE :: IN",
"parent": "abstract-service-soap-connector-in",
"description": "Factory Uniform active exchange soap-connector-in of entaxy.runtime.connector",
"isAbstract": false
},
"entaxy.runtime.connector": {
"type": "uniform-active-exchange",
"protocol": "uniform-active-exchange"
},
"fields": {
"period": {
"displayName": "Period",
"description": "Period",
"type": "String",
"required": true,
"group": "entaxy"
},
"endpointUrl": {
"displayName": "Endpoint Url",
"description": "Endpoint Url",
"type": "String",
"required": true,
"group": "entaxy"
}
},
"outputs": {
"init": {
"isDefault": true,
"fields": {
"generateLoggingKey": {
"isHidden": false
},
"period": {},
"endpointUrl": {}
},
"config": {
"configurable": true,
"fieldsConfigurableByDefault": true,
"configurableFields": {
"includeNames":["endpointUrl","period"],
"includePatterns":[]
}
}
}
}
}

View File

@ -0,0 +1,39 @@
{
"factory": {
"id": "uniform-active-exchange-connector-out",
"type": "entaxy.runtime.connector",
"displayName": "UNIFORM :: ACTIVE :: OUT",
"parent": "abstract-connector-out",
"description": "Uniform active exchange OUT-connector (producer) factory",
"isAbstract": false
},
"entaxy.runtime.connector": {
"type": "uniform-active-exchange",
"protocol": "uniform-active-exchange"
},
"fields": {
"endpointUrl": {
"displayName": "Endpoint Url",
"description": "Endpoint Url",
"type": "String",
"required": true,
"group": "entaxy"
}
},
"outputs": {
"init": {
"isDefault": true,
"fields": {
"endpointUrl": {}
},
"config": {
"configurable": true,
"fieldsConfigurableByDefault": true,
"configurableFields": {
"includeNames":["endpointUrl"],
"includePatterns":[]
}
}
}
}
}

View File

@ -0,0 +1,25 @@
{
"factory": {
"id": "uniform-passive-exchange-connector-in",
"type": "entaxy.runtime.connector",
"displayName": "UNIFORM :: PASSIVE :: IN",
"parent": "abstract-service-soap-connector-in",
"description": "Factory Uniform passive exchange soap-connector-in of entaxy.runtime.connector",
"isAbstract": false
},
"entaxy.runtime.connector": {
"type": "uniform-passive-exchange",
"protocol": "uniform-passive-exchange"
},
"fields": {
},
"outputs": {
"init": {
"isDefault": true,
"config": {
"configurable": false
}
}
}
}

View File

@ -0,0 +1,24 @@
{
"factory": {
"id": "uniform-passive-exchange-connector-out",
"type": "entaxy.runtime.connector",
"displayName": "UNIFORM :: PASSIVE :: OUT",
"parent": "abstract-connector-out",
"description": "Uniform passive exchange OUT-connector (producer) factory",
"isAbstract": false
},
"entaxy.runtime.connector": {
"type": "uniform-passive-exchange",
"protocol": "uniform-passive-exchange"
},
"fields": {
},
"outputs": {
"init": {
"isDefault": true,
"config": {
"configurable": false
}
}
}
}

View File

@ -0,0 +1,423 @@
[#ftl attributes={"generated.type":"blueprint"}]
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap-type="http://www.entaxy.ru/ExchangeTypes/1.0"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
[#import "templates:object-commons/common-utils.ftl" as utils]
<reference id="entaxy-broker" interface="org.apache.camel.Component"
filter="(connection.name=entaxy-broker)"/>
<bean id="forced" class="java.lang.IllegalArgumentException">
<argument index="0" value="Content is invalid"/>
</bean>
<bean id="headersConverter" class="ru.entaxy.esb.system.common.util.HeadersConverter">
<property name="namespace" value="http://www.entaxy.ru/ExchangeTypes/1.0"/>
<property name="customHeaders" value="NTX_CustomHeaders"/>
<property name="customHeaderPrefix" value="NTX_UNIFORM_EXCHANGE_CustomHeader"/>
</bean>
<camelContext id="[=objectId]" xmlns="http://camel.apache.org/schema/blueprint">
<route id="[=objectId].uniform-service-active-in-connector">
<from uri="timer://get-package?synchronous=true&amp;period=[=utils.convertConfigValue(properties.period)]"/>
<setHeader name="NTX_SystemId">
<constant>[=properties.profile]</constant>
</setHeader>
<setHeader name="ENTAXY_SystemEndpoint">
<constant>[=utils.convertConfigValue(properties.endpointUrl)]</constant>
</setHeader>
<setProperty name="sender">
<simple>[=properties.profile]</simple>
</setProperty>
<setProperty name="service">
<constant>uniform-service-active</constant>
</setProperty>
<setProperty name="operation">
<simple>GET</simple>
</setProperty>
[#if properties.generateLoggingKey?? && properties.generateLoggingKey]
<to uri="direct-vm:fill-logging-key"/>
[/#if]
<log message="${headers.NTX_loggingKey} Timer for uniform exchange active-in started" loggingLevel="DEBUG"/>
<to uri="direct:uniform-service-connector-get-package-active?block=true&amp;timeout=60000"/>
</route>
<!--In-->
<route id="[=objectId].get-package-active" streamCache="true">
<from uri="direct:uniform-service-connector-get-package-active"/>
<when>
<simple>${headers.ENTAXY_SystemEndpoint} == null || ${headers.NTX_SystemId} == null</simple>
<log message="${headers.NTX_loggingKey} ENTAXY_SystemEndpoint is not set" loggingLevel="ERROR"/>
<stop/>
</when>
<setHeader name="SystemHasMessages">
<constant>true</constant>
</setHeader>
<setHeader name="operationNamespace">
<constant>http://www.entaxy.ru/connector/universal/system/1.0</constant>
</setHeader>
<setHeader name="CamelDestinationOverrideUrl">
<simple>${headers.ENTAXY_SystemEndpoint}</simple>
</setHeader>
<loop doWhile="true" copy="true">
<simple resultType="Boolean">${headers.SystemHasMessages} == 'true'</simple>
<to uri="direct:get-package"/>
</loop>
</route>
<route id="[=objectId].direct:get-package">
<from uri="direct:get-package"/>
<setHeader name="NTX_BusUUID">
<constant>FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF</constant>
</setHeader>
<setHeader name="ENTAXY_Destination">
<constant></constant>
</setHeader>
<to uri="xslt:ru/entaxy/esb/platform/runtime/modules/uniform-service/xslt/GetPacketRequest.xsl?failOnNullBody=false"/>
<removeHeader headerName="NTX_BusUUID"/>
<removeHeader headerName="ENTAXY_Destination"/>
<setHeader name="operationName">
<constant>GetPackets</constant>
</setHeader>
<to uri="direct-vm:uniform-service-send-package-active"/>
<removeHeader headerName="SOAPAction"/>
<setBody>
<xpath>//soap-type:response/soap-type:packets</xpath>
</setBody>
<choice>
<when>
<xpath>//soap-type:packets/soap-type:packet[1]/soap-type:message/soap-type:content/node()
</xpath>
<setBody>
<xpath>//soap-type:packets/soap-type:packet[1]</xpath>
</setBody>
<to uri="entaxy-broker:queue:entaxy.uniform.service.exchange.send.to.profile?exchangePattern=InOnly"/>
<setHeader name="NTX_UUID">
<simple>${headers.ENTAXY_MessageUUID}</simple>
</setHeader>
<to uri="xslt:ru/entaxy/esb/platform/runtime/modules/uniform-service/xslt/ConfirmGettingPacketRequest.xsl?failOnNullBody=false"/>
<setHeader name="operationName">
<constant>ConfirmGettingPackets</constant>
</setHeader>
<to uri="direct-vm:uniform-service-send-package-active"/>
<removeHeader headerName="SOAPAction"/>
<when>
<xpath>not(//soap-type:status/text() = '200')</xpath>
<log message="${headers.NTX_loggingKey} ConfirmGettingPacket fail" loggingLevel="ERROR"/>
<!-- TODO что делать с сообщением в очереди ? -->
</when>
<setHeader name="SystemHasMessages">
<constant>true</constant>
</setHeader>
</when>
<otherwise>
<setHeader name="SystemHasMessages">
<constant>false</constant>
</setHeader>
<log message="${headers.NTX_loggingKey} System ${headers.NTX_SystemId} does not have messages" loggingLevel="INFO"/>
</otherwise>
</choice>
</route>
<route id="[=objectId].soap-send-to-profile">
<from uri="entaxy-broker:queue:entaxy.uniform.service.exchange.send.to.profile"/>
<setHeader name="ENTAXY_MessageUUID">
<xpath resultType="String">//soap-type:packet/soap-type:message/soap-type:messageUUID/text()</xpath>
</setHeader>
<setHeader name="ENTAXY_Destination">
<xpath resultType="String">
//soap-type:packet/soap-type:header/soap-type:destination/soap-type:id/text()
</xpath>
</setHeader>
<setHeader name="ENTAXY_DestinationType">
<xpath resultType="String">
//soap-type:packet/soap-type:header/soap-type:destination/soap-type:type/text()
</xpath>
</setHeader>
<setHeader name="ENTAXY_Source">
<xpath resultType="String">//soap-type:packet/soap-type:message/soap-type:source/soap-type:id/text()
</xpath>
</setHeader>
<setHeader name="ENTAXY_SourceType">
<xpath resultType="String">//soap-type:packet/soap-type:message/soap-type:source/soap-type:type/text()
</xpath>
</setHeader>
<choice>
<when>
<simple>${headers.ENTAXY_Source} == ''</simple>
<setHeader name="ENTAXY_Source">
<simple>${headers.X-SystemName}</simple>
</setHeader>
</when>
<when>
<simple>${headers.NTX_SystemId} != ${headers.ENTAXY_Source}</simple>
<log message="${headers.NTX_loggingKey} Source name header and SystemId is not equals!" loggingLevel="WARN"/>
</when>
</choice>
<setHeader name="ENTAXY_MessageType">
<xpath resultType="String">//soap-type:packet/soap-type:message/soap-type:messageType/text()</xpath>
</setHeader>
<setHeader name="ENTAXY_Priority">
<xpath resultType="Integer">//soap-type:packet/soap-type:message/soap-type:priority/text()</xpath>
</setHeader>
<setHeader name="ENTAXY_ExchangePattern">
<xpath resultType="String">/soap-type:packet/soap-type:message/soap-type:exchangePattern/text()
</xpath>
</setHeader>
<choice>
<when>
<simple>${headers.ENTAXY_ExchangePattern} == 'InOut'</simple>
<setExchangePattern pattern="InOut"/>
</when>
<otherwise>
<setExchangePattern pattern="InOnly"/>
</otherwise>
</choice>
<when>
<simple>${headers.ENTAXY_Priority} == null || ${headers.ENTAXY_Priority} == ""</simple>
<setHeader name="ENTAXY_Priority">
<simple resultType="Integer">4</simple>
</setHeader>
</when>
<setHeader name="NTX_CustomHeaders">
<xpath>//soap-type:packet/soap-type:message/soap-type:customHeader</xpath>
</setHeader>
<to uri="direct:get-content-and-content-type"/>
<when>
<simple>${body} == null</simple>
<log message="${headers.NTX_loggingKey} Content is invalid" loggingLevel="ERROR"/>
<throwException ref="forced"/>
</when>
<removeHeaders pattern="*" excludePattern="NTX_.+|CamelJms.+|ENTAXY_.+"/>
<to uri="direct:exit-cascade-start" />
</route>
<route id="[=objectId].send-packets">
<from uri="direct:send-packets"/>
<setHeader name="NTX_UNIFORM_EXCHANGE_PacketCount">
<xpath resultType="Integer">count(/soap-type:packets/soap-type:packet)</xpath>
</setHeader>
<when>
<simple>${headers.NTX_UNIFORM_EXCHANGE_PacketCount} &gt; 1</simple>
<throwException exceptionType="java.lang.UnsupportedOperationException"
message="Not supported more then 1 packet"/>
</when>
<setBody>
<xpath resultType="org.w3c.dom.Document">/soap-type:packets/soap-type:packet[1]</xpath>
</setBody>
<setHeader name="ENTAXY_MessageUUID">
<xpath resultType="String">/soap-type:packet/soap-type:message/soap-type:messageUUID/text()</xpath>
</setHeader>
<choice>
<when>
<simple>${headers.ENTAXY_MessageUUID} == "00000000-0000-0000-0000-000000000000"</simple>
[#-- health check --]
<removeHeaders pattern="ENTAXY_.+|NTX_.+|X-.+"/>
<setBody>
<simple><![CDATA[
<test/>
]]>
</simple>
</setBody>
<to uri="xslt:ru/entaxy/esb/platform/runtime/modules/uniform-service/xslt/PutPacketResponse.xsl?failOnNullBody=false"/>
</when>
<otherwise>
<setHeader name="ENTAXY_Destination">
<xpath resultType="String">
/soap-type:packet/soap-type:header/soap-type:destination/soap-type:id/text()
</xpath>
</setHeader>
<setHeader name="ENTAXY_DestinationType">
<xpath resultType="String">
/soap-type:packet/soap-type:header/soap-type:destination/soap-type:type/text()
</xpath>
</setHeader>
<log message="${headers.NTX_loggingKey} Receive message ${headers.ENTAXY_MessageUUID} for ${headers.ENTAXY_Destination}"
loggingLevel="INFO"/>
<setHeader name="ENTAXY_Source">
<xpath resultType="String">
/soap-type:packet/soap-type:message/soap-type:source/soap-type:id/text()
</xpath>
</setHeader>
<setHeader name="ENTAXY_SourceType">
<xpath resultType="String">
/soap-type:packet/soap-type:message/soap-type:source/soap-type:type/text()
</xpath>
</setHeader>
<when>
<simple>${headers.X-SystemName} != ${headers.ENTAXY_Source}</simple>
<log message="${headers.NTX_loggingKey} Source name header and auth username is not equals!" loggingLevel="WARN"/>
<when>
<simple>${headers.ENTAXY_Source} == ''</simple>
<setHeader name="ENTAXY_Source">
<simple>${headers.X-SystemName}</simple>
</setHeader>
</when>
</when>
<setHeader name="ENTAXY_MessageType">
<xpath resultType="String">/soap-type:packet/soap-type:message/soap-type:messageType/text()
</xpath>
</setHeader>
<setHeader name="ENTAXY_Priority">
<xpath resultType="Integer">/soap-type:packet/soap-type:message/soap-type:priority/text()
</xpath>
</setHeader>
<setHeader name="ENTAXY_ExchangePattern">
<xpath resultType="String">/soap-type:packet/soap-type:message/soap-type:exchangePattern/text()
</xpath>
</setHeader>
<choice>
<when>
<simple>${headers.ENTAXY_ExchangePattern} == 'InOut'</simple>
<setExchangePattern pattern="InOut"/>
</when>
<otherwise>
<setExchangePattern pattern="InOnly"/>
</otherwise>
</choice>
<setHeader name="NTX_CustomHeaders">
<xpath>/soap-type:packet/soap-type:message/soap-type:customHeader</xpath>
</setHeader>
<bean ref="headersConverter" method="xml2Json"/>
<log message="${headers.NTX_loggingKey} Headers converted: ${headers}" loggingLevel="DEBUG"/>
<to uri="direct:get-content-and-content-type"/>
<when>
<simple>${body} == null</simple>
<log message="${headers.NTX_loggingKey} Content is invalid" loggingLevel="ERROR"/>
<throwException ref="forced"/>
</when>
<removeHeaders pattern="*" excludePattern="NTX_.+|CamelJms.+|ENTAXY_.+|X-.+"/>
<to uri="direct:exit-cascade-start" />
<removeHeaders pattern="ENTAXY_.+|NTX_.+|X-.+"/>
<setBody>
<simple><![CDATA[
<test/>
]]>
</simple>
</setBody>
<to uri="xslt:ru/entaxy/esb/platform/runtime/modules/uniform-service/xslt/PutPacketResponse.xsl?failOnNullBody=false"/>
</otherwise>
</choice>
</route>
<route id="[=objectId].get-content-and-content-type">
<from uri="direct:get-content-and-content-type"/>
<setHeader name="ENTAXY_ContentType">
<xpath resultType="String">/soap-type:packet/soap-type:message/soap-type:contentType/text()
</xpath>
</setHeader>
<choice>
<when>
<xpath>count(/soap-type:packet/soap-type:message/soap-type:content) = 1</xpath>
<setHeader name="CamelJms_IntContentXsiType">
<xpath resultType="String">
/soap-type:packet/soap-type:message/soap-type:content/@xsi:type
</xpath>
</setHeader>
<setHeader name="NTX_ContentHasNotEmptyText">
<xpath resultType="Boolean">
boolean(normalize-space(/soap-type:packet/soap-type:message/soap-type:content/text()))
</xpath>
</setHeader>
<setHeader name="NTX_ContentChildNodesCount">
<xpath resultType="Integer">
count(/soap-type:packet/soap-type:message/soap-type:content/child::*)
</xpath>
</setHeader>
<choice>
<when>
<simple>${headers.NTX_ContentChildNodesCount} == 1</simple>
<setBody>
<xpath resultType="org.w3c.dom.Document">
/soap-type:packet/soap-type:message/soap-type:content/*
</xpath>
</setBody>
<setHeader name="CamelJms_IntMessageType">
<constant>Document</constant>
</setHeader>
</when>
<when>
<simple>${headers.NTX_ContentChildNodesCount} > 1</simple>
<setBody>
<xpath resultType="org.w3c.dom.NodeList">
/soap-type:packet/soap-type:message/soap-type:content/*
</xpath>
</setBody>
<setHeader name="CamelJms_IntMessageType">
<constant>NodeList</constant>
</setHeader>
</when>
<when>
<simple>${headers.NTX_ContentChildNodesCount} == 0</simple>
<choice>
<when>
<simple>${headers.NTX_ContentHasNotEmptyText}</simple>
<setBody>
<xpath resultType="String">
/soap-type:packet/soap-type:message/soap-type:content/text()
</xpath>
</setBody>
<setHeader name="CamelJms_IntMessageType">
<constant>String</constant>
</setHeader>
</when>
<otherwise>
<setBody>
<constant>
<![CDATA[
<emptyContent xmlns="http://www.entaxy.ru/connector/universal/internal"/>
]]>
</constant>
</setBody>
</otherwise>
</choice>
</when>
<otherwise>
<log message="${headers.NTX_loggingKey} Content is invalid" loggingLevel="ERROR"/>
<throwException ref="forced"/>
</otherwise>
</choice>
<removeHeader headerName="NTX_ContentHasNotEmptyText"/>
<removeHeader headerName="NTX_ContentChildNodesCount"/>
</when>
<otherwise>
<setBody>
<constant>
<![CDATA[
<empty xmlns="http://www.entaxy.ru/connector/universal/internal"/>
]]>
</constant>
</setBody>
</otherwise>
</choice>
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,103 @@
[#ftl attributes={"generated.type":"blueprint"}]
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap-type="http://www.entaxy.ru/ExchangeTypes/1.0"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
[#import "templates:object-commons/common-utils.ftl" as utils]
<reference id="entaxy-broker" interface="org.apache.camel.Component"
filter="(connection.name=entaxy-broker)"/>
<bean id="uuidGenerator" class="java.util.UUID" scope="prototype" factory-method="randomUUID"/>
<bean id="headerMergeAggregator" class="ru.entaxy.esb.system.common.aggregation.HeaderMergeAggregatorImpl"/>
<bean id="headersConverter" class="ru.entaxy.esb.system.common.util.HeadersConverter">
<property name="namespace" value="http://www.entaxy.ru/ExchangeTypes/1.0"/>
<property name="customHeaders" value="NTX_CustomHeaders"/>
<property name="customHeaderPrefix" value="NTX_UNIFORM_EXCHANGE_CustomHeader"/>
</bean>
<camelContext id="[=objectId]" xmlns="http://camel.apache.org/schema/blueprint">
<route id="[=objectId].output-route">
<from uri="direct:entry-cascade-finish"/>
<when>
<simple>${headers.ENTAXY_Priority} == null || ${headers.ENTAXY_Priority} == ""</simple>
<setHeader name="ENTAXY_Priority">
<simple resultType="Integer">4</simple>
</setHeader>
</when>
<setHeader name="NTX_OutQueue">
<simple>entaxy.uniform.service.exchange.active.[=properties.profile]</simple>
</setHeader>
<removeHeaders pattern="X-.+"/>
<log message="${headers.NTX_loggingKey} Message sent to broker to queue:${headers.NTX_OutQueue}"
loggingLevel="INFO"/>
<log message="${headers.NTX_loggingKey} Body is: ${body}" loggingLevel="TRACE"/>
<toD uri="entaxy-broker:queue:${headers.NTX_OutQueue}?priority=${headers.ENTAXY_Priority}"/>
</route>
<route id="[=objectId].soap-out-active-connector" streamCache="true">
<from uri="entaxy-broker:queue:entaxy.uniform.service.exchange.active.[=properties.profile]"/>
<log message="${headers.NTX_loggingKey} Message ${headers} send to system" loggingLevel="TRACE"/>
<setHeader name="NTX_SystemId">
<constant>[=properties.profile]</constant>
</setHeader>
<setHeader name="ENTAXY_SystemEndpoint">
<constant>[=utils.convertConfigValue(properties.endpointUrl)]</constant>
</setHeader>
<log message="${headers.NTX_loggingKey} ACTIVE-CONSUMER: Message for system ${headers.NTX_SystemId} to ${headers.ENTAXY_SystemEndpoint}"
loggingLevel="DEBUG"/>
<when>
<simple>${headers.ENTAXY_SystemEndpoint} == null || ${headers.NTX_SystemId} == null</simple>
<log message="${headers.NTX_loggingKey} ENTAXY_SystemEndpoint for ${headers.NTX_SystemId} is not set"
loggingLevel="ERROR"/>
<stop/>
</when>
<bean ref="headersConverter" method="json2xml"/>
<setHeader name="NTX_OutQueue">
<simple>entaxy.uniform.service.exchange.active.[=properties.profile]</simple>
</setHeader>
<setHeader name="ENTAXY_AcknowledgeMsgID">
<simple>${bean:uuidGenerator.toString}</simple>
</setHeader>
<to uri="direct-vm:uniform-service-common-save-acknowledge?block=true&amp;timeout=70000"/>
<setBody>
<simple><![CDATA[
<body>${body}</body>
]]>
</simple>
</setBody>
<to uri="xslt:ru/entaxy/esb/platform/runtime/modules/uniform-service/xslt/PutPacketRequest.xsl"/>
<setHeader name="operationNamespace">
<constant>http://www.entaxy.ru/connector/universal/system/1.0</constant>
</setHeader>
<setHeader name="operationName">
<constant>PutPackets</constant>
</setHeader>
<setHeader name="CamelDestinationOverrideUrl">
<simple>${headers.ENTAXY_SystemEndpoint}</simple>
</setHeader>
<to uri="direct-vm:uniform-service-send-package-active"/>
<choice>
<when>
<xpath>not(//soap-type:status/text() = '200')</xpath>
<log message="${headers.NTX_loggingKey} PutPackets fail" loggingLevel="ERROR"/>
</when>
<otherwise>
<setHeader name="NTX_AckMessage">
<simple>true</simple>
</setHeader>
<to uri="entaxy-broker:queue:entaxy.uniform.service.exchange.aggregate?exchangePattern=InOnly&amp;asyncConsumer=true"/>
</otherwise>
</choice>
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,265 @@
[#ftl attributes={"generated.type":"blueprint"}]
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap-type="http://www.entaxy.ru/ExchangeTypes/1.0"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
[#import "templates:object-commons/common-utils.ftl" as utils]
<bean id="uniform-service-exchange-connector-info" class="ru.entaxy.platform.services.runtime.impl.EntaxyServiceConnectorInfoImpl">
<property name="serviceId" value="uniform-service" />
<property name="profileId" value="[=properties.profile]" />
<property name="direction" value="in" />
<property name="endpoint" value="direct-vm:[=objectId]-uniform-service-exchange.entry-point" />
</bean>
<service activation="eager" interface="ru.entaxy.platform.services.runtime.EntaxyServiceConnectorInfo"
ref="uniform-service-exchange-connector-info">
<service-properties>
<entry key="profile" value="[=properties.profile]"/>
<entry key="service" value="uniform-service-in"/>
<entry key="direction" value="in"/>
</service-properties>
</service>
<bean id="forced" class="java.lang.IllegalArgumentException">
<argument index="0" value="Content is invalid"/>
</bean>
<bean id="headersConverter" class="ru.entaxy.esb.system.common.util.HeadersConverter">
<property name="namespace" value="http://www.entaxy.ru/ExchangeTypes/1.0"/>
<property name="customHeaders" value="NTX_CustomHeaders"/>
<property name="customHeaderPrefix" value="NTX_UNIFORM_EXCHANGE_CustomHeader"/>
</bean>
<camelContext id="[=objectId]" xmlns="http://camel.apache.org/schema/blueprint">
<globalOptions>
<globalOption key="CamelLogEipName" value="ru.entaxy.esb.uniform.exchange.passive.in.[=properties.profile]"/>
</globalOptions>
<route id="[=objectId].uniform-service-exchange.input-route">
<from uri="direct-vm:[=objectId]-uniform-service-exchange.entry-point" />
<log message="${headers.NTX_loggingKey} Body is ${body}" loggingLevel="TRACE"/>
<to uri="direct:send-packets"/>
</route>
<route id="[=objectId].send-packets">
<from uri="direct:send-packets"/>
<setHeader name="NTX_UNIFORM_EXCHANGE_PacketCount">
<xpath resultType="Integer">count(/soap-type:packets/soap-type:packet)</xpath>
</setHeader>
<when>
<simple>${headers.NTX_UNIFORM_EXCHANGE_PacketCount} &gt; 1</simple>
<throwException exceptionType="java.lang.UnsupportedOperationException"
message="Not supported more then 1 packet"/>
</when>
<setBody>
<xpath resultType="org.w3c.dom.Document">/soap-type:packets/soap-type:packet[1]</xpath>
</setBody>
<setHeader name="ENTAXY_MessageUUID">
<xpath resultType="String">/soap-type:packet/soap-type:message/soap-type:messageUUID/text()</xpath>
</setHeader>
<when>
<simple>${headers.ENTAXY_generateLoggingKey}</simple>
<to uri="direct-vm:fill-logging-key"/>
</when>
<log message="${headers.NTX_loggingKey} Message-id is ${headers.ENTAXY_MessageUUID}" loggingLevel="INFO"/>
<choice>
<when>
<simple>${headers.ENTAXY_MessageUUID} == "00000000-0000-0000-0000-000000000000"</simple>
[#-- health check --]
<removeHeaders pattern="ENTAXY_.+|NTX_.+|X-.+"/>
<setBody>
<simple><![CDATA[
<test/>
]]>
</simple>
</setBody>
<to uri="xslt:ru/entaxy/esb/platform/runtime/modules/uniform-service/xslt/PutPacketResponse.xsl?failOnNullBody=false"/>
</when>
<otherwise>
<setHeader name="ENTAXY_Destination">
<xpath resultType="String">
/soap-type:packet/soap-type:header/soap-type:destination/soap-type:id/text()
</xpath>
</setHeader>
<setHeader name="ENTAXY_DestinationType">
<xpath resultType="String">
/soap-type:packet/soap-type:header/soap-type:destination/soap-type:type/text()
</xpath>
</setHeader>
<log message="${headers.NTX_loggingKey} Receive message ${headers.ENTAXY_MessageUUID} for ${headers.ENTAXY_Destination}"
loggingLevel="INFO"/>
<setHeader name="ENTAXY_Source">
<xpath resultType="String">
/soap-type:packet/soap-type:message/soap-type:source/soap-type:id/text()
</xpath>
</setHeader>
<setHeader name="ENTAXY_SourceType">
<xpath resultType="String">
/soap-type:packet/soap-type:message/soap-type:source/soap-type:type/text()
</xpath>
</setHeader>
<when>
<simple>${headers.X-SystemName} != ${headers.ENTAXY_Source}</simple>
<log message="${headers.NTX_loggingKey} Source name header and auth username is not equals!" loggingLevel="WARN"/>
<when>
<simple>${headers.ENTAXY_Source} == ''</simple>
<setHeader name="ENTAXY_Source">
<simple>${headers.X-SystemName}</simple>
</setHeader>
</when>
</when>
<setHeader name="ENTAXY_MessageType">
<xpath resultType="String">/soap-type:packet/soap-type:message/soap-type:messageType/text()
</xpath>
</setHeader>
<setHeader name="ENTAXY_Priority">
<xpath resultType="Integer">/soap-type:packet/soap-type:message/soap-type:priority/text()
</xpath>
</setHeader>
<setHeader name="ENTAXY_ExchangePattern">
<xpath resultType="String">/soap-type:packet/soap-type:message/soap-type:exchangePattern/text()
</xpath>
</setHeader>
<choice>
<when>
<simple>${headers.ENTAXY_ExchangePattern} == 'InOut'</simple>
<setExchangePattern pattern="InOut"/>
</when>
<otherwise>
<setExchangePattern pattern="InOnly"/>
</otherwise>
</choice>
<setHeader name="NTX_CustomHeaders">
<xpath>/soap-type:packet/soap-type:message/soap-type:customHeader</xpath>
</setHeader>
<bean ref="headersConverter" method="xml2Json"/>
<log message="${headers.NTX_loggingKey} Headers converted: ${headers}" loggingLevel="DEBUG"/>
<to uri="direct:get-content-and-content-type"/>
<when>
<simple>${body} == null</simple>
<log message="${headers.NTX_loggingKey} Content is invalid" loggingLevel="ERROR"/>
<throwException ref="forced"/>
</when>
<removeHeaders pattern="*" excludePattern="NTX_.+|CamelJms.+|ENTAXY_.+|X-.+"/>
<to uri="direct:exit-cascade-start" />
<removeHeaders pattern="ENTAXY_.+|NTX_.+|X-.+"/>
<setBody>
<simple><![CDATA[
<test/>
]]>
</simple>
</setBody>
<to uri="xslt:ru/entaxy/esb/platform/runtime/modules/uniform-service/xslt/PutPacketResponse.xsl?failOnNullBody=false"/>
</otherwise>
</choice>
</route>
<route id="[=objectId].get-content-and-content-type">
<from uri="direct:get-content-and-content-type"/>
<setHeader name="ENTAXY_ContentType">
<xpath resultType="String">/soap-type:packet/soap-type:message/soap-type:contentType/text()
</xpath>
</setHeader>
<choice>
<when>
<xpath>count(/soap-type:packet/soap-type:message/soap-type:content) = 1</xpath>
<setHeader name="CamelJms_IntContentXsiType">
<xpath resultType="String">
/soap-type:packet/soap-type:message/soap-type:content/@xsi:type
</xpath>
</setHeader>
<setHeader name="NTX_ContentHasNotEmptyText">
<xpath resultType="Boolean">
boolean(normalize-space(/soap-type:packet/soap-type:message/soap-type:content/text()))
</xpath>
</setHeader>
<setHeader name="NTX_ContentChildNodesCount">
<xpath resultType="Integer">
count(/soap-type:packet/soap-type:message/soap-type:content/child::*)
</xpath>
</setHeader>
<choice>
<when>
<simple>${headers.NTX_ContentChildNodesCount} == 1</simple>
<setBody>
<xpath resultType="org.w3c.dom.Document">
/soap-type:packet/soap-type:message/soap-type:content/*
</xpath>
</setBody>
<setHeader name="CamelJms_IntMessageType">
<constant>Document</constant>
</setHeader>
</when>
<when>
<simple>${headers.NTX_ContentChildNodesCount} > 1</simple>
<setBody>
<xpath resultType="org.w3c.dom.NodeList">
/soap-type:packet/soap-type:message/soap-type:content/*
</xpath>
</setBody>
<setHeader name="CamelJms_IntMessageType">
<constant>NodeList</constant>
</setHeader>
</when>
<when>
<simple>${headers.NTX_ContentChildNodesCount} == 0</simple>
<choice>
<when>
<simple>${headers.NTX_ContentHasNotEmptyText}</simple>
<setBody>
<xpath resultType="String">
/soap-type:packet/soap-type:message/soap-type:content/text()
</xpath>
</setBody>
<setHeader name="CamelJms_IntMessageType">
<constant>String</constant>
</setHeader>
</when>
<otherwise>
<setBody>
<constant>
<![CDATA[
<emptyContent xmlns="http://www.entaxy.ru/connector/universal/internal"/>
]]>
</constant>
</setBody>
</otherwise>
</choice>
</when>
<otherwise>
<log message="${headers.NTX_loggingKey} Content is invalid" loggingLevel="ERROR"/>
<throwException ref="forced"/>
</otherwise>
</choice>
<removeHeader headerName="NTX_ContentHasNotEmptyText"/>
<removeHeader headerName="NTX_ContentChildNodesCount"/>
</when>
<otherwise>
<setBody>
<constant>
<![CDATA[
<empty xmlns="http://www.entaxy.ru/connector/universal/internal"/>
]]>
</constant>
</setBody>
</otherwise>
</choice>
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,189 @@
[#ftl attributes={"generated.type":"blueprint"}]
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap-type="http://www.entaxy.ru/ExchangeTypes/1.0"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
[#import "templates:object-commons/common-utils.ftl" as utils]
<reference id="entaxy-broker" interface="org.apache.camel.Component"
filter="(connection.name=entaxy-broker)"/>
<bean id="uuidGenerator" class="java.util.UUID" scope="prototype" factory-method="randomUUID"/>
<bean id="uniform-service-exchange-connector-info"
class="ru.entaxy.platform.services.runtime.impl.EntaxyServiceConnectorInfoImpl">
<property name="serviceId" value="uniform-service"/>
<property name="profileId" value="[=properties.profile]"/>
<property name="direction" value="out"/>
<property name="endpoint" value="direct-vm:[=objectId].uniform-exchange.entry-point.for-get"/>
</bean>
<service activation="eager" interface="ru.entaxy.platform.services.runtime.EntaxyServiceConnectorInfo"
ref="uniform-service-exchange-connector-info">
<service-properties>
<entry key="profile" value="[=properties.profile]"/>
<entry key="service" value="uniform-service-out"/>
<entry key="direction" value="out"/>
</service-properties>
</service>
<bean id="headerMergeAggregator" class="ru.entaxy.esb.system.common.aggregation.HeaderMergeAggregatorImpl"/>
<bean id="headersConverter" class="ru.entaxy.esb.system.common.util.HeadersConverter">
<property name="namespace" value="http://www.entaxy.ru/ExchangeTypes/1.0"/>
<property name="customHeaders" value="NTX_CustomHeaders"/>
<property name="customHeaderPrefix" value="NTX_UNIFORM_EXCHANGE_CustomHeader"/>
</bean>
<camelContext id="[=objectId]" xmlns="http://camel.apache.org/schema/blueprint">
<globalOptions>
<globalOption key="CamelLogEipName" value="ru.entaxy.esb.uniform.exchange.passive.out.[=properties.profile]"/>
</globalOptions>
<route id="[=objectId].output-route">
<from uri="direct:entry-cascade-finish"/>
<when>
<simple>${headers.ENTAXY_Priority} == null || ${headers.ENTAXY_Priority} == ""</simple>
<setHeader name="ENTAXY_Priority">
<simple resultType="Integer">4</simple>
</setHeader>
</when>
<setHeader name="NTX_OutQueue">
<simple>entaxy.uniform.service.exchange.[=properties.profile]</simple>
</setHeader>
<removeHeaders pattern="X-.+"/>
<log message="${headers.NTX_loggingKey} Message sent to broker to queue:${headers.NTX_OutQueue} "
loggingLevel="INFO"/>
<log message="${headers.NTX_loggingKey} Body is: ${body}" loggingLevel="TRACE"/>
<toD uri="entaxy-broker:queue:${headers.NTX_OutQueue}?priority=${headers.ENTAXY_Priority}"/>
</route>
<route id="[=objectId].input-route">
<from uri="direct-vm:[=objectId].uniform-exchange.entry-point.for-get"/>
<choice>
<when>
<simple>${headers.operationName} == 'ConfirmGettingPackets'</simple>
<to uri="direct:confirm-packets"/>
</when>
<when>
<simple>${headers.operationName} == 'GetPackets'</simple>
<to uri="direct:get-packets"/>
</when>
<otherwise>
<to uri="direct:sent-message"/>
</otherwise>
</choice>
</route>
<route id="[=objectId].confirm-packets">
<from uri="direct:confirm-packets"/>
<setHeader name="NTX_UuidCount">
<xpath resultType="Integer">count(/soap-type:uuids/soap-type:uuid)</xpath>
</setHeader>
<when>
<simple>${headers.NTX_UuidCount} &gt; 1</simple>
<log message="${headers.NTX_loggingKey} Not supported more then 1 uuid" loggingLevel="WARN"/>
<throwException exceptionType="java.lang.UnsupportedOperationException"
message="Not supported more then 1 uuid"/>
</when>
<setBody>
<xpath resultType="org.w3c.dom.Document">/soap-type:uuids/soap-type:uuid[1]</xpath>
</setBody>
<setHeader name="ENTAXY_AcknowledgeMsgID">
<xpath resultType="String">/soap-type:uuid/text()</xpath>
</setHeader>
<to uri="direct-vm:uniform-service-receive-acknowledge"/>
<setHeader name="NTX_UUID">
<simple>${headers.ENTAXY_AcknowledgeMsgID}</simple>
</setHeader>
<to uri="xslt:ru/entaxy/esb/platform/runtime/modules/uniform-service/xslt/ConfirmGettingPacketResponse.xsl?failOnNullBody=false"/>
<removeHeaders pattern="Authorization|breadcrumbId|NTX_.+|ENTAXY_.+"/>
</route>
<route id="[=objectId].get-packets">
<from uri="direct:get-packets"/>
<setHeader name="NTX_SystemId">
<xpath>/soap-type:getPacketsRequest/soap-type:destination/soap-type:id/text()</xpath>
</setHeader>
<choice>
<when>
<simple>${headers.NTX_SystemId} == ''</simple>
<setHeader name="NTX_SystemId">
<simple>${headers.X-SystemName}</simple>
</setHeader>
</when>
<when>
<simple>${headers.NTX_SystemId} != ${headers.X-SystemName}</simple>
<log message="${headers.NTX_loggingKey} Source name header and SystemId is not equals!" loggingLevel="WARN"/>
<throwException exceptionType="java.security.AccessControlException" message="Unauthorized"/>
</when>
</choice>
<setHeader name="NTX_OutQueue">
<simple>entaxy.uniform.service.exchange.[=properties.profile]</simple>
</setHeader>
<setHeader name="NTX_LimitCount">
<xpath resultType="Integer">/soap-type:getPacketsRequest/soap-type:limitCount/text()</xpath>
</setHeader>
<setHeader name="NTX_LimitSize">
<xpath resultType="Integer">/soap-type:getPacketsRequest/soap-type:limitSize/text()</xpath>
</setHeader>
<when>
<simple>${headers.NTX_LimitCount} &gt; 1 || ${headers.NTX_LimitSize} &gt; 0</simple>
<log message="${headers.NTX_loggingKey} Not supported limitation mode! Only default values." loggingLevel="WARN"/>
<throwException exceptionType="java.lang.UnsupportedOperationException"
message="Not supported limitation mode! Only default values."/>
</when>
<log message="${headers.NTX_loggingKey} Fetch From JMS queue: ${headers.NTX_OutQueue}; SystemId=${headers.NTX_SystemId}"
loggingLevel="INFO"/>
<setBody>
<simple>${null}</simple>
</setBody>
<pollEnrich timeout="0" strategyRef="headerMergeAggregator">
<simple>entaxy-broker:queue:${headers.NTX_OutQueue}</simple>
</pollEnrich>
<choice>
<when>
<simple>${body} == null</simple>
<log message="${headers.NTX_loggingKey} No Messages" loggingLevel="WARN"/>
<setHeader name="NTX_Status">
<constant>204</constant>
</setHeader>
<to uri="xslt:ru/entaxy/esb/platform/runtime/modules/uniform-service/xslt/GetPacketResponse.xsl?failOnNullBody=false"/>
<removeHeaders pattern="NTX_Status"/>
</when>
<otherwise>
<log message="${headers.NTX_loggingKey} Get Message ${body}" loggingLevel="DEBUG"/>
<setHeader name="ENTAXY_AcknowledgeMsgID">
<simple>${bean:uuidGenerator.toString}</simple>
</setHeader>
<to uri="direct-vm:uniform-service-common-save-acknowledge?block=true&amp;timeout=70000"/>
<bean ref="headersConverter" method="json2xml"/>
<when>
<simple>${headers.CamelJms_IntMessageType} == 'String'</simple>
<bean beanType="org.apache.commons.lang3.StringEscapeUtils"
method="escapeXml(${body})"/>
</when>
<setBody>
<simple><![CDATA[<body>${body}</body>]]></simple>
</setBody>
<to uri="xslt:ru/entaxy/esb/platform/runtime/modules/uniform-service/xslt/GetPacketResponse.xsl"/>
<to uri="direct-vm:uniform-service-transform-body?block=true&amp;timeout=30000"/>
<log message="${headers.NTX_loggingKey} Send message ${headers.ENTAXY_MessageUUID} for ${headers.NTX_SystemId} ackId ${headers.ENTAXY_AcknowledgeMsgID}"
loggingLevel="INFO"/>
<removeHeaders pattern="JMS.+|NTX_.+|ENTAXY_.+"/>
</otherwise>
</choice>
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,175 @@
ЛИЦЕНЗИЯ ОГРАНИЧЕННОГО ПРИМЕНЕНИЯ
Настоящий документ устанавливает для Пользователя условия применения Базовой (некоммерческой)
версии лицензии для пробного использования программного обеспечения ENTAXY, принадлежащего
Правообладателю Обществу с ограниченной ответственностью "ЕМДЕВ" (ОГРН 1057810026658, ИНН
7813313860, юридический адрес: 197022, Россия, г. Санкт-Петербург, ул. Профессора Попова,
д. 23, литера В, помещение 3Н), расположенной в сети Интернет по адресу
https://www.emdev.ru/about (далее - Компания).
Используя или получая доступ к Программному обеспечению, или нажав «Я согласен с Условиями»
(или аналогичную кнопку или флажок) после загрузки или установки Программного обеспечения,
Пользователь выражает свое согласие на обязательность условий и ограничений, изложенных в
настоящем документе, в противном случае, он должен не использовать или не получать доступ
к Программному обеспечению.
1. ТЕРМИНЫ И ОПРЕДЕЛЕНИЯ
a) ПО Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) в любой ее версии
или редакции, исключительные права на которую принадлежат Правообладателю.
b) Правообладатель (Компания) ООО «ЕМДЕВ», ОГРН 1057810026658, ИНН 7813313860, исключительные
права которого подтверждаются Свидетельством о государственной регистрации в Реестре программ
для ЭВМ № 2021610848 от 19.01.2021 года.
c) Пользователь юридическое или физическое лицо, получившее через скачивание с сайта
https://entaxy.ru или иным образом, дистрибутив ПО, пользующееся ПО.
d) ИС интеллектуальная собственность закреплённое законом исключительное право, а также
личные неимущественные права авторов произведений на результат интеллектуальной деятельности.
e) Подписка это коммерческое предложение Правообладателя, состоящее из Лицензии на использование
ПО и доступа к технической поддержке программного обеспечения на срок Подписки. Подписка
включает предоставление Пользователю неисключительного права использования ПО, в том числе
получение обновлений функционала ПО и безопасности ПО, исправление ошибок ПО и получение
патчей с обновлениями и исправлениями программного обеспечения. Подписка приобретается
Пользователем на период времени, указанный в Сертификате. Количество подписок устанавливается
для каждого Пользователя индивидуально в Сертификате.
f) Сертификат документ, выдаваемый Дистрибъютором или Авторизованным партнёром (Партнёром),
подтверждающий факт приобретения физическим или юридическим лицом Подписки на программное
обеспечение в ограниченном объёме и на определённый период времени.
g) Лицензия (простая (неисключительная) совокупность ограниченных прав использования ПО,
предоставленных Пользователю согласно условиям Подписки.
h) Библиотека совокупность подпрограмм и объектов, используемых для разработки программного
обеспечения.
i) Исходный код текст компьютерной программы на каком-либо языке программирования, состоящий
из одного или нескольких файлов, который может быть прочтён человеком.
j) Объектный код файл (часть машинного кода) с промежуточным представлением отдельного модуля
программы, полученный в результате обработки исходного кода, еще не связанный в полную программу.
Это машинный код для одной конкретной библиотеки или модуля, который будет составлять готовый
продукт.
k) Некоммерческое использование индивидуальное личное использование Пользователем программного
обеспечения с целью обучения работе с Программным обеспечением, для оценки или демонстрации
возможностей Программного обеспечения, при котором, Пользователем не извлекается коммерческая
выгода и/или не идёт в доход денежное вознаграждение при использовании Программного обеспечения.
2. ДОПУСТИМЫЕ СПОСОБЫ ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ
2.1. Правообладатель предоставляет Пользователю ограниченное право использования Программного
обеспечения на условиях простой (неисключительной) лицензии в объёме, ограниченном правом
воспроизведения полной рабочей версии программного обеспечения, новых версий программного обеспечения
в памяти оборудования и его запуска на оборудовании в соответствии со ст. 1280 ГК РФ.
2.2. Право на использование Программного обеспечения, предоставляемое Пользователю, носит
неисключительный характер.
2.3. Пользователю предоставляется всемирная, неисключительная, не подлежащая сублицензированию,
лицензия на ограниченное использование Программного обеспечения.
2.4. Пользователь, имеющий Базовую (некоммерческую) версию лицензии для пробного использования
имеет право приобрести Подписку на программное обеспечение. В этом случае Пользователь обязан
обратиться в службу поддержки Правообладателя по адресу: https://entaxy.ru/ для изменения
вида лицензии с Базовой бесплатной версии на Подписки.
2.5. Срок использования скачанной Пользователем базовой (некоммерческой) версии лицензии для
пробного использования программного обеспечения не ограничен.
2.6. Использование Пользователем настоящего программного обеспечения в целях разработки,
модификации, обновления другого ПО, принадлежащего третьим лицам, а не Правообладателю,
без разрешения Правообладателя не допускается.
3. АВТОРСКОЕ ПРАВО.
3.1. Все авторские права, все права интеллектуальной собственности на Программное обеспечение
и любые его копии принадлежат Правообладателю.
3.2. Все авторские права, все права интеллектуальной собственности в отношении любого контента,
к которому можно получить доступ с помощью Программного обеспечения, является собственностью
соответствующего владельца контента и защищается применимым законодательством об авторском
праве или другими законами и договорами об интеллектуальной собственности.
3.3. Условия использования Программного обеспечения.
Лицензия, предоставленная Пользователю, действительна только в том случае, если Пользователь
придерживается следующих условий:
3.3.1. Принятие уведомлений об авторских правах. Пользователю запрещается удалять или изменять
какие-либо уведомления об авторских правах или лицензиях, которые появляются при использовании
Программного обеспечения или на нем.
3.3.2. Модификация. Пользователю запрещается модифицировать, изменять, декомпилировать,
расшифровывать, дизассемблировать, переводить или реверсировать, перепроектировать
Программное обеспечение.
3.3.3. Распространение. Пользователю запрещается сублицензировать, передавать право использования
ПО или иным образом распространять или предоставлять Программное обеспечение любой третьей стороне.
3.3.4. SaaS. За исключением случаев, когда это разрешено Правообладателем, Пользователю запрещено
использовать Программное обеспечение в коммерческих целях для оказания услуг третьим лицам.
4. ОТВЕТСТВЕННОСТЬ ПРАВООБЛАДАТЕЛЯ ПРИ НАРУШЕНИИ ПОЛЬЗОВАТЕЛЕМ ПРАВ «ИС»
4.1. Правообладатель не несет никаких обязательств в отношении каких-либо претензий к Пользователю
на предмет нарушения последним прав Интеллектуальной собственности, возникших в связи с
использованием Пользователем:
4.1.1. Любых компонентов программного обеспечения с открытым исходным кодом, включенных в
Программное обеспечение;
4.1.2. Любого нарушения правил использования Программного обеспечения, установленного условиями
настоящего соглашения;
4.1.3. Любого использования Программного обеспечения в сочетании с другими ПО, оборудованием,
или данными, не предоставленными Пользователю Правообладателем;
4.1.4. Любого изменения Программного обеспечения любым третьим лицом, а не Правообладателем.
5. НАСТОЯЩИМ ПРАВООБЛАДАТЕЛЬ ЗАЯВЛЯЕТ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ ПОЛЬЗОВАТЕЛЮ
ПО ПРИНЦИПУ «AS IS» - «КАК ЕСТЬ». НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ НЕ ГАРАНТИРУЕТ
И НЕ ОБЕЩАЕТ, ЧТО ПРЕДОСТАВЛЕННОЕ ИМ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ПОДХОДИТЬ ИЛИ НЕ ПОДХОДИТЬ
ДЛЯ КОНКРЕТНЫХ ЦЕЛЕЙ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ОТВЕЧАТЬ ВСЕМ КОММЕРЧЕСКИМ
И ЛИЧНЫМ СУБЪЕКТИВНЫМ ОЖИДАНИЯМ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ РАБОТАТЬ
ИСПРАВНО, БЕЗ ТЕХНИЧЕСКИХ ОШИБОК, БЫСТРО И БЕСПЕРЕБОЙНО.
6. ОГРАНИЧЕНИЕ ОТВЕТСТВЕННОСТИ.
НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ ИЛИ ЕГО АФФИЛЛИРОВАННЫЕ ЛИЦА НЕ НЕСУТ ПЕРЕД ПОЛЬЗОВАТЕЛЕМ
ОТВЕТСТВЕННОСТИ ЗА ЛЮБЫЕ ПРЯМЫЕ ИЛИ КОСВЕННЫЕ УБЫТКИ ПОЛЬЗОВАТЕЛЯ, ЕГО РАСХОДЫ ИЛИ РЕАЛЬНЫЙ УЩЕРБ,
ВКЛЮЧАЯ, ПОМИМО ПРОЧЕГО, ПРОСТОИ; УТРАТУ БИЗНЕСА; УПУЩЕННУЮ ВЫГОДУ; НЕДОПОЛУЧЕННУЮ ПРИБЫЛЬ;
ПОТЕРЮ ИЛИ ПОВРЕЖДЕНИЕ ДАННЫХ, ИМУЩЕСТВА И ИНОЕ.
ОГРАНИЧЕНИЯ ПРИМЕНЯЮТСЯ НЕЗАВИСИМО ОТ ОСНОВАНИЯ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ; В ТОМ ЧИСЛЕ ВСЛЕДСТВИЕ
ДЕЙСТВИЯ ИЛИ БЕЗДЕЙСТВИЯ, НЕБРЕЖНОСТИ, УМЫСЛА, ПРЯМОГО ИЛИ КОСВЕННОГО; НЕОСТОРОЖНОСТИ; ЗАБЛУЖДЕНИЯ;
КЛЕВЕТЫ; НАРУШЕНИЯ КОНФИДЕНЦИАЛЬНОСТИ ИЛИ ПРАВА ИНТЕЛЛЕКТУАЛЬНОЙ СОБСТВЕННОСТИ; ИЛИ ЛЮБОЕ ДРУГОЕ
ОСНОВАНИЕ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ.
7. ОБЯЗАННОСТЬ ПОЛЬЗОВАТЕЛЯ:
Не осуществлять самостоятельно и (или) с привлечением третьих лиц нижеследующие действия
(включая, но не ограничиваясь) по:
-дизассемблированию и (или) декомпилированию (преобразованию объектного кода в исходный код)
Программного обеспечения;
-модификации Программного обеспечения, в том числе вносить изменения в объектный код, исходный
код Программного обеспечения, за исключением тех изменений, которые вносятся средствами,
включёнными в Программное обеспечение и описанными непосредственно в документации к нему;
-созданию условий для использования Программного обеспечения лицами, не имеющими прав на
использование данного Программного обеспечения, включая (но не ограничиваясь) вмешательство
третьих лиц в функционирование Программного обеспечения, предоставление третьим лицам доступа
к исследованию и (или) замене настроек Программного обеспечения, включая его первичную установку;
-распространению Программного обеспечения в целом или в части (включая приложенную к нему документацию).
8. БИБЛИОТЕКА ПО. ИСПОЛЬЗУЕМЫЕ ПРОГРАММНЫЕ СРЕДСТВА.
8.1. Настоящим, Правообладатель заверяет, что Библиотека программного обеспечения состоит из
лицензионных продуктов, используемых на законных основаниях, а
именно https://entaxy.ru/libs/licenses/root-aggregated.deps.
8.2. Любые программные средства, применяемые Пользователем при работе с ПО, должны быть
совместимы с библиотекой ПО, указанной в п.8.1. настоящего соглашения.
8.3. Перечень внешних модулей ПО, указанный в п.8.1 настоящего соглашения, может изменяться
Правообладателем в одностороннем порядке, в зависимости от выпуска релизов программного обеспечения,
содержащих все изменения и дополнения программного обеспечения.
9. ВНЕСЕНИЕ ИЗМЕНЕНИЙ В ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ.
9.1. Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) является свободно распространяемым
программным обеспечением.
9.2. Пользователь имеет право вносить изменения в исходный код программного обеспечения исключительно
с согласия Правообладателя в порядке предложения изменений/правок/дополнений через механизм
«Pull Requests» в открытом репозитории Правообладателя по адресу: https://git.entaxy.ru/entaxy/entaxy-public.
9.3. Любые изменения программного обеспечения, осуществляемые Пользователем без соблюдения условий
пункта 9.2. настоящего документа, являются нарушением авторских и смежных прав Правообладателя,
прав интеллектуальной собственности Правообладателя и влекут применение к Пользователю мер
ответственности в соответствии с условиями настоящей Лицензии, а также применимого законодательства
Российской Федерации.
10. ЗАКЛЮЧИТЕЛЬНЫЕ ПОЛОЖЕНИЯ.
10.1. В случае нарушения Пользователем любого из условий настоящей Лицензии, Правообладатель имеет
право взыскать с Пользователя любые причинённые таким нарушением убытки, реальный ущерб,
недополученную прибыль, упущенную выгоду, а также в случае нарушения Пользователем условий
пункта 9.2 настоящего соглашения, в том числе, взыскать с Пользователя штраф в размере
2 000 000 (Два миллиона) рублей за каждый установленный случай несанкционированного изменения
исходного или объектного кода Программного обеспечения «Энтакси» (Entaxy).
10.2. В рамках исполнения Пользователем обязательств по настоящей Лицензии, применимое
законодательство Российской Федерации.
10.3. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>ru.entaxy.esb.platform.runtime.modules</groupId>
<artifactId>uniform-service</artifactId>
<version>1.10.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>ru.entaxy.esb.platform.runtime.modules.uniform.service</groupId>
<artifactId>service</artifactId>
<packaging>bundle</packaging>
<name>ENTAXY :: PLATFORM :: RUNTIME :: MODULES :: UNIFORM :: SERVICE</name>
<description>ENTAXY :: PLATFORM :: RUNTIME :: MODULES :: UNIFORM :: SERVICE</description>
<properties>
<bundle.osgi.import.pkg>
javax.xml.soap*;version="[1.3,2)",
javax.jws.*;version="[2.0.0,3.0.0)",
javax.jws.soap.*;version="[2.0.0,3.0.0)",
javax.xml.ws.*;version="[2.2.0,3.0.0)",
ru.entaxy.esb.system.core.common.error.handler.interceptor,
ru.entaxy.esb.system.profile.commons,
ru.entaxy.esb.system.profile.commons.connectors.in,
ru.entaxy.esb.system.profile.commons.connectors.out,
javax.xml.bind;version="[2,3)",
javax.xml.bind.annotation;version="[2,3)",
javax.persistence;version="[2,3)",
ru.entaxy.esb.platform.runtime.modules.uniform-service.wsdl,
ru.entaxy.esb.platform.runtime.modules.uniform-service.xslt,
ru.entaxy.esb.platform.runtime.modules.uniform-service.xslt.type,
ru.entaxy.platform.services.runtime.exceptions,
*
</bundle.osgi.import.pkg>
</properties>
<dependencies>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>core-support-runtime-legacy</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.profile-implementation</groupId>
<artifactId>profile-runtime-legacy-support</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core.initializer</groupId>
<artifactId>init-manager</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>artifact-management</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Entaxy-Factory-Provider>true</Entaxy-Factory-Provider>
<Entaxy-Template-Provider>true</Entaxy-Template-Provider>
<Entaxy-Resource-Provider>true</Entaxy-Resource-Provider>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,166 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.runtime.modules.unifrom_service.service;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Map.Entry;
import org.apache.felix.utils.properties.Properties;
import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.platform.runtime.core.initializer.api.AbstractStandaloneInitializer;
import ru.entaxy.esb.platform.runtime.core.initializer.api.Initialized;
import ru.entaxy.esb.platform.runtime.core.initializer.api.StandaloneInitializer;
import ru.entaxy.platform.core.artifact.Artifact;
import ru.entaxy.platform.core.artifact.ArtifactCoordinates;
import ru.entaxy.platform.core.artifact.Artifacts;
import ru.entaxy.platform.core.artifact.DeployedArtifact;
import ru.entaxy.platform.core.artifact.installer.builder.InstallationResult;
import ru.entaxy.platform.core.artifact.installer.builder.Installer;
import ru.entaxy.platform.core.artifact.installer.builder.typed.CommonBundleInstaller;
import ru.entaxy.platform.core.artifact.repository.impl.DeployedArtifactImpl;
import ru.entaxy.platform.core.artifact.service.ArtifactService;
@Deprecated(since = "1.10", forRemoval = true)
@StandaloneInitializer(id = "uniform-service")
// @Component(service = UniformServiceInitializer.class, immediate = true)
public class UniformServiceInitializer extends AbstractStandaloneInitializer {
private static final Logger log = LoggerFactory.getLogger(UniformServiceInitializer.class);
private final static int REPEAT_COUNT = 5;
private final static int INTERVAL = 15000;
public static final String PATH_SUFFIX = "init/install/uniform-service.properties";
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY, target = "(id=artifacts)")
volatile Initialized artifactsInitializerReady;
@Reference(cardinality = ReferenceCardinality.MANDATORY)
ArtifactService artifactService;
@Activate
public void activate(ComponentContext componentContext) {
setBundleContext(componentContext.getBundleContext());
Path configPath = Paths.get(System.getProperty("karaf.etc"), PATH_SUFFIX);
File configFile = configPath.toFile();
if (!configFile.exists())
return;
try {
Properties properties = new Properties(configFile);
for (Entry<String, String> entry : properties.entrySet()) {
String url = entry.getKey();
String paramsData = entry.getValue();
InstallationParams params = InstallationParams.parse(paramsData);
Artifact artifact = Artifacts.create(params.artifactCategory);
artifact.getCoordinates().set(ArtifactCoordinates.fromUrl(url));
DeployedArtifact depoyedArtifact = new DeployedArtifactImpl(artifact, "mvn:" + url);
Installer<?> installer = params.installShared ? artifactService.installers().cluster()
: artifactService.installers().local();
installer.artifact(depoyedArtifact);
CommonBundleInstaller bundleInstaller = installer.typed(CommonBundleInstaller.class);
InstallationResult result = null;
for (int i = 0; i < REPEAT_COUNT; i++) {
result = bundleInstaller.installOnlyIfMissing().start().startLevel(params.startLevel).install();
if (result != null && result.isSuccessful())
break;
try {
Thread.sleep(INTERVAL);
} catch (InterruptedException e) {
log.trace(e.getMessage());
}
}
if (result != null && result.isSuccessful())
log.info("Installed successfully: [{}]", url);
else {
log.error("Installation failed: [{}] :: {}", url,
result == null ? "Result is null" : result.getMessage());
if (result != null && result.getError() != null) {
log.error("DETAILS:", result.getError());
}
}
}
} catch (IOException e) {
log.error("Error processing properties", e);
}
}
protected static class InstallationParams {
protected static final String SHARED_TARGET = "shared";
public static InstallationParams parse(String data) {
InstallationParams result = new InstallationParams();
String[] values = data.split(";");
result.installShared = values[0].equals(SHARED_TARGET);
if (values.length > 1)
result.artifactCategory = values[1].trim();
if (values.length > 2)
try {
result.startLevel = Integer.parseInt(values[2].trim());
} catch (Exception ignore) {
}
return result;
}
boolean installShared = true;
String artifactCategory = "jar";
int startLevel = 100;
}
}

View File

@ -0,0 +1,154 @@
{
"factory": {
"id": "uniform-based-soap-service-protected",
"displayName": "SOAP :: UNIFORM :: PROTECTED",
"type": "entaxy.runtime.service",
"description": "Uniform SOAP service",
"isAbstract": false,
"isInternal": true,
"parent": "wsdl-based-soap-service-protected",
"label": "service,soap,uniform",
"category": ""
},
"entaxy.runtime.service": {},
"fields": {
"operationRouter": {
"source": "schemas/uniform-service/operationRouterProtected.xml",
"defaultValue": {
"@RESOURCE": {
"location": {
"@CALCULATED": {
"lazy": false,
"expression": "schemas/uniform-service/operationRouterProtected.xml"
}
}
}
},
"@TYPEINFO": {
"location": "schemas/uniform-service/operationRouterProtected.xml"
}
},
"##headers": {
"type": "List",
"required": false,
"isHidden": true,
"defaultValue": [
{
"name": "Entaxy-Dynamic-Factory-Provider",
"type": "boolean",
"value": false
}
]
}
},
"outputs": {
"init": {
"isDefault": true,
"generator": "",
"config": {
"configurable": false
},
"fields": {
"operationRouter": {
"source": "schemas/uniform-service/operationRouterProtected.xml",
"defaultValue": {
"@RESOURCE": {
"location": {
"@CALCULATED": {
"lazy": false,
"expression": "schemas/uniform-service/operationRouterProtected.xml"
}
}
}
},
"@TYPEINFO": {
"location": "schemas/uniform-service/operationRouterProtected.xml"
},
"immutable": true
},
"connectorInFactory": {
"required": false
},
"objectId": {
"immutable": true,
"defaultValue": "uniform-passive-service",
"fixedValue": "uniform-passive-service"
},
"address": {
"immutable": true,
"defaultValue": "uniform-exchange",
"fixedValue": "uniform-exchange"
},
"serviceFullName": {
"immutable": true
},
"port": {
"immutable": true
},
"dataFormat": {
"immutable": true
},
"displayServiceSchema": {
"defaultValue": true,
"fixedValue": true,
"immutable": true
},
"mtomEnabled": {
"immutable": true,
"defaultValue": false,
"fixedValue": false
},
"schemaValidationEnabled": {
"immutable": true,
"defaultValue": false
},
"_serviceMetadata": {
"immutable": true
},
"serviceName": {
"immutable": true
},
"serviceNamespace": {
"immutable": true
},
"authorizationType": {
"defaultValue": "JAAS"
},
"schemaUrl": {
"immutable": true,
"defaultValue": "schemas:uniform-service/soap-passive.wsdl",
"fixedValue": "schemas:uniform-service/soap-passive.wsdl"
},
"connectorDispatchingBeans": {
"defaultValue": {
"factoryId": "uniform-based-soap-service-protected"
}
},
"@IMPORT": [
{
"sourceFactoryId": "service-components",
"location": "outputs.specificProtectedServiceComponents.fields",
"prefix": ""
}
],
"##headers": {
"required": false
}
}
},
"connectorDispatchingBeans": {
"scopes": [
"private"
],
"fields": {
"serviceId": {
"type": "String"
}
},
"config": {
"configurable": false,
"@SKIP_PUBLISH": {}
}
}
}
}

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<route>
<from uri="direct:uniform-passive-service-operation-router"/>
<choice>
<when>
<simple>${headers.operationName} == 'PutPackets'</simple>
<log loggingLevel="DEBUG"
message="${headers.NTX_loggingKey} Called operation: ${headers.operationName} with message-type: ${header.message-type}"/>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Sending to connector: in"/>
<log loggingLevel="TRACE" message="${headers.NTX_loggingKey} Body: ${body}"/>
<to uri="bean:uniform-passive-service-in-connector-registry?method=inConnectorFind"/>
<choice>
<when>
<simple>${headers.NTX_targetConnector} != null</simple>
<setProperty name="NTX_TMP_targetConnector">
<simple>${headers.NTX_targetConnector}</simple>
</setProperty>
<removeHeader headerName="NTX_targetConnector"/>
<toD uri="${exchangeProperty.NTX_TMP_targetConnector}"/>
</when>
<otherwise>
<log message="${headers.NTX_loggingKey} Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=in"
loggingLevel="ERROR"/>
<throwException
exceptionType="ru.entaxy.platform.services.runtime.exceptions.ConnectorNotFound"
message="Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=in"/>
</otherwise>
</choice>
</when>
<when>
<simple>${headers.operationName} == 'ConfirmGettingPackets'</simple>
<log loggingLevel="DEBUG"
message="${headers.NTX_loggingKey} Called operation: ${headers.operationName}"/>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Sending to connector: out"/>
<to uri="bean:uniform-passive-service-out-connector-registry?method=outConnectorFind"/>
<choice>
<when>
<simple>${headers.NTX_targetConnector} != null</simple>
<setProperty name="NTX_TMP_targetConnector">
<simple>${headers.NTX_targetConnector}</simple>
</setProperty>
<removeHeader headerName="NTX_targetConnector"/>
<toD uri="${exchangeProperty.NTX_TMP_targetConnector}"/>
</when>
<otherwise>
<log message="${headers.NTX_loggingKey} Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"
loggingLevel="ERROR"/>
<throwException
exceptionType="ru.entaxy.platform.services.runtime.exceptions.ConnectorNotFound"
message="Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"/>
</otherwise>
</choice>
</when>
<when>
<simple>${headers.operationName} == 'GetPackets'</simple>
<log loggingLevel="DEBUG"
message="${headers.NTX_loggingKey} Called operation: ${headers.operationName}"/>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Sending to connector: out"/>
<to uri="bean:uniform-passive-service-out-connector-registry?method=outConnectorFind"/>
<choice>
<when>
<simple>${headers.NTX_targetConnector} != null</simple>
<setProperty name="NTX_TMP_targetConnector">
<simple>${headers.NTX_targetConnector}</simple>
</setProperty>
<removeHeader headerName="NTX_targetConnector"/>
<toD uri="${exchangeProperty.NTX_TMP_targetConnector}"/>
</when>
<otherwise>
<log message="${headers.NTX_loggingKey} Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"
loggingLevel="ERROR"/>
<throwException
exceptionType="ru.entaxy.platform.services.runtime.exceptions.ConnectorNotFound"
message="Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"/>
</otherwise>
</choice>
</when>
<otherwise>
<log message="${headers.NTX_loggingKey} Uniform service operation ${header.operationName} isn't support"
loggingLevel="ERROR"/>
<throwException exceptionType="java.lang.IllegalArgumentException"
message="Uniform service operation ${header.operationName} isn't support"/>
</otherwise>
</choice>
</route>

View File

@ -0,0 +1,30 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<bean id="[=serviceId]-in-connector-registry"
class="ru.entaxy.platform.services.runtime.impl.EntaxyServiceConnectorRegistry" activation="eager">
<property name="profileNameHeaders">
<list value-type="java.lang.String">
<value>X-SystemName</value>
</list>
</property>
</bean>
<reference-list interface="ru.entaxy.platform.services.runtime.EntaxyServiceConnectorInfo"
filter="(service=uniform-service-in)" availability="optional">
<reference-listener ref="[=serviceId]-in-connector-registry"
bind-method="register" unbind-method="unregister"/>
</reference-list>
<bean id="[=serviceId]-out-connector-registry"
class="ru.entaxy.platform.services.runtime.impl.EntaxyServiceConnectorRegistry" activation="eager">
<property name="profileNameHeaders">
<list value-type="java.lang.String">
<value>X-SystemName</value>
</list>
</property>
</bean>
<reference-list id="connectorOutList"
interface="ru.entaxy.platform.services.runtime.EntaxyServiceConnectorInfo"
filter="(service=uniform-service-out)" availability="optional">
<reference-listener ref="[=serviceId]-out-connector-registry"
bind-method="register" unbind-method="unregister"/>
</reference-list>

View File

@ -0,0 +1,108 @@
[#ftl attributes={"generated.type":"blueprint"}]
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf"
xmlns:cxf="http://cxf.apache.org/blueprint/core"
xmlns:[=objectId]="[=properties.serviceNamespace]"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<!-- xmlns:soap-type="http://www.entaxy.ru/ExchangeTypes/1.0" -->
<!--
factoryId: wsdl-based-soap-service-public
factoryType: entaxy.runtime.service
outputType: init
properties:
[#list properties?keys as key]
[=key]
[/#list]
-->
<camelcxf:cxfEndpoint id="[=objectId]-cxf-endpoint"
address="/[=properties.address]"
endpointName="[=objectId]:[=properties.port]"
serviceName="[=objectId]:[=properties.serviceName]"
wsdlURL="entaxy-resource://[=properties.schemaUrl?replace(":", "/")]">
<camelcxf:properties>
<entry key="dataFormat" value="[=properties.dataFormat]"/>
<entry key="mtom-enabled" value="[=properties.mtomEnabled?c]"/>
<entry key="schema-validation-enabled" value="[=properties.schemaValidationEnabled?c]"/>
</camelcxf:properties>
<camelcxf:inInterceptors>
[#if properties.authorizationType == "JAAS"]
<ref component-id="jaasLoginInterceptor" />
[#if properties.restrictByRoles]
<ref component-id="simpleAuthorizingInterceptor" />
[/#if]
<ref component-id="resolveProfileNameInterceptor" />
<ref component-id="resolveLoginInterceptor"/>
[#if properties.displayServiceSchema]
<!-- ref component-id="isSchemaDisplayInterceptor" / -->
[#else]
<ref component-id="disableWSDLGetInterceptor" />
<ref component-id="postAuthWsdlGetInterceptor" />
[/#if]
[/#if]
<ref component-id="validator"/>
</camelcxf:inInterceptors>
</camelcxf:cxfEndpoint>
<bean id="validator" class="ru.entaxy.platform.services.runtime.interceptor.SOAPValidateInterceptor">
<property name="schemaValidationEnabled" value="[=properties.schemaValidationEnabled?c]"/>
</bean>
[#if properties.authorizationType == "JAAS"]
<bean id="jaasLoginInterceptor" class="org.apache.cxf.interceptor.security.JAASLoginInterceptor">
<property name="contextName" value="[=properties.authorizationRealm]" />
<property name="roleClassifier" value="RolePrincipal"/>
<property name="roleClassifierType" value="classname"/>
<property name="allowAnonymous" value="false"/>
<property name="allowNamedPrincipals" value="true"/>
</bean>
<bean id="resolveProfileNameInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.ResolveProfileNameInterceptor">
</bean>
<bean id="resolveLoginInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.ResolveLoginInterceptor" />
[#if properties.restrictByRoles]
<bean id="simpleAuthorizingInterceptor" class="org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor">
<property name="methodRolesMap">
<map>
<!-- NOT IMPLEMENTED YET -->
<!-- no wildcard support, names need to match exactly -->
<!-- entry key="addNumbers" value="ROLE_USER ROLE_ADMIN"/>
<entry key="divideNumbers" value="ROLE_ADMIN"/ -->
</map>
</property>
<!-- its possible to define global roles that apply to all WSDL operations not listed above -->
<property name="globalRoles" value="[=properties.globalRoles]"/>
</bean>
[/#if]
[#if properties.displayServiceSchema]
<!-- bean id="isSchemaDisplayInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.IsSchemaDisplayInterceptor">
<property name="isDisplayServiceSchema" value="[=displayServiceSchema?c]"/>
</bean -->
[#else]
<bean id="postAuthWsdlGetInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.PostAuthWSDLGetInterceptor">
</bean>
<bean id="disableWSDLGetInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.DisableWSDLGetInterceptor">
</bean>
[/#if]
[/#if]
[#import "templates:object-commons/common-utils.ftl" as utils]
<camelContext id="[=objectId]" xmlns="http://camel.apache.org/schema/blueprint">
<route id="[=objectId]-cxf-endpoint" streamCache="true">
<from uri="cxf:bean:[=objectId]-cxf-endpoint"/>
<setHeader name="ENTAXY_EndpointName">
<simple>[=objectId]</simple>
</setHeader>
[#include "templates:service-components/generateLoggingKey.ftl"]
<to uri="direct:[=objectId]-operation-router" />
<removeProperties pattern="NTX.+|ENTAXY.+"/>
<removeHeaders pattern="NTX.+|ENTAXY.+"/>
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,5 @@
<!-- -->
<configfile finalname="etc/uniform.service.support.cfg" override="true">
mvn:ru.entaxy.esb.platform.runtime.modules/uniform-service/1.10.0/cfg/uniform.service.support
</configfile>
<!-- -->

View File

@ -0,0 +1,49 @@
###
# ~~~~~~licensing~~~~~~
# uniform-service
# ==========
# Copyright (C) 2020 - 2024 EmDev LLC
# ==========
# You may not use this file except in accordance with the License Terms of the Copyright
# Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
# rights to the Software and any copies are the property of the Copyright Holder. Unless
# it is explicitly allowed the Copyright Holder, the User is prohibited from using the
# Software for commercial purposes to provide services to third parties.
#
# The Copyright Holder hereby declares that the Software is provided on an "AS IS".
# Under no circumstances does the Copyright Holder guarantee or promise that the
# Software provided by him will be suitable or not suitable for the specific purposes
# of the User, that the Software will meet all commercial and personal subjective
# expectations of the User, that the Software will work properly, without technical
# errors, quickly and uninterruptedly.
#
# Under no circumstances shall the Copyright Holder or its Affiliates is not liable
# to the User for any direct or indirect losses of the User, his expenses or actual
# damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
# or damage to data, property, etc.
# ~~~~~~/licensing~~~~~~
###
# максимальное количество попыток отправить сообщение в очередь из агрегатора
redelivery.maximumRedeliveries=2
# очередь для отправки сообщений, которые не смог отправить агрегатор в destination
redelivery.deadLetterQueue=revert.message.dead
# задается в mc, значение по умолчанию 10 минут
acknowledge.completion.timeout=600000
# настройка способа агрегирования через игнайт или бд
# Важно! следить за тем чтобы данный параметр был одинаковым во всем кластере
# варианты - igniteAggregationRepository, jdbcAggregationRepository (для всех бд кроме postgres), postgresAggregationRepository
# по умолчанию - jdbcAggregationRepository
acknowledge.aggregation.repository=jdbcAggregationRepository
# Поднимается endpoint /active_connector_test_consumer
# при выставленной настройке mode.dev=true
active.mode.dev=false
active.username=Администратор
active.password=
# валидация сообщения по wsdl
active.validation=false
# параметр для тестирования активного коннектора
test.empty.rate=20

View File

@ -0,0 +1,256 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
uniform-service
==========
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
rights to the Software and any copies are the property of the Copyright Holder. Unless
it is explicitly allowed the Copyright Holder, the User is prohibited from using the
Software for commercial purposes to provide services to third parties.
The Copyright Holder hereby declares that the Software is provided on an "AS IS".
Under no circumstances does the Copyright Holder guarantee or promise that the
Software provided by him will be suitable or not suitable for the specific purposes
of the User, that the Software will meet all commercial and personal subjective
expectations of the User, that the Software will work properly, without technical
errors, quickly and uninterruptedly.
Under no circumstances shall the Copyright Holder or its Affiliates is not liable
to the User for any direct or indirect losses of the User, his expenses or actual
damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
or damage to data, property, etc.
~~~~~~/licensing~~~~~~
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf" xmlns:cxf="http://cxf.apache.org/blueprint/core" xmlns:uniform-passive-service="http://www.entaxy.ru/connector/universal/esb/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"><manifest xmlns="http://karaf.apache.org/xmlns/deployer/blueprint/v1.0.0">Manifest-Version: 1.0
Bundle-ManifestVersion: 2
DynamicImport-Package: *
Entaxy-Bundle: true
Entaxy-Runtime: true
Entaxy-Generated-Object-Configuration: eyJvYmplY3RJZCI6InVuaWZvcm0tcGFzc2l2ZS1zZXJ2aWNlIiwiZmFjdG9yeUlkIjoidW5pZm9ybS1iYXNlZC1zb2FwLXNlcnZpY2UtcHJvdGVjdGVkIiwidHlwZSI6ImVudGF4eS5ydW50aW1lLnNlcnZpY2UiLCJzY29wZSI6InB1YmxpYyIsInByb3BlcnRpZXMiOnsiZ2VuZXJhdGVMb2dnaW5nS2V5Ijp0cnVlLCJzZXJ2aWNlRnVsbE5hbWUiOiJ7aHR0cDovL3d3dy5lbnRheHkucnUvY29ubmVjdG9yL3VuaXZlcnNhbC9lc2IvMS4wfWVzYkV4Y2hhbmdlIiwiZ2xvYmFsUm9sZXMiOiIqIiwicG9ydCI6ImVzYkV4Y2hhbmdlU09BUCIsImF1dGhvcml6YXRpb25SZWFsbSI6ImthcmFmIiwicmVzdHJpY3RCeVJvbGVzIjpmYWxzZSwiZXJyb3JIYW5kbGVyVHlwZSI6IkRlZmF1bHRFcnJvckhhbmRsZXIiLCJkZWFkTGV0dGVyVXJpIjoibG9nOm15TG9nIiwiYWRkcmVzcyI6InVuaWZvcm0tZXhjaGFuZ2UiLCJzY2hlbWFVcmwiOiJzY2hlbWFzOnVuaWZvcm0tc2VydmljZS9zb2FwLXBhc3NpdmUud3NkbCIsImRpc3BsYXlTZXJ2aWNlU2NoZW1hIjp0cnVlLCJhdXRob3JpemF0aW9uVHlwZSI6IkpBQVMiLCJkYXRhRm9ybWF0IjoiUEFZTE9BRCIsIm10b21FbmFibGVkIjpmYWxzZSwic2NoZW1hVmFsaWRhdGlvbkVuYWJsZWQiOmZhbHNlLCJzZXJ2aWNlTmFtZSI6ImVzYkV4Y2hhbmdlIiwic2VydmljZU5hbWVzcGFjZSI6Imh0dHA6Ly93d3cuZW50YXh5LnJ1L2Nvbm5lY3Rvci91bml2ZXJzYWwvZXNiLzEuMCIsIm9wZXJhdGlvblJvdXRlciI6eyJAUkVTT1VSQ0VfUkVGIjoib2JqZWN0LXJlc291cmNlczplbnRheHkucnVudGltZS5zZXJ2aWNlLnVuaWZvcm0tcGFzc2l2ZS1zZXJ2aWNlL29wZXJhdGlvblJvdXRlci54bWwifX0sIl9fdXVpZF9fIjoiNjlhMjg3NDQtOGQ2MC00NmNhLWJlZGUtYjlkOGMyODFiMjU1In0=
Bundle-Name: entaxy.runtime.service.uniform-passive-service
Entaxy-Generated: true
Bundle-Version: 1.0.0
Entaxy-Generated-Object: uniform-passive-service:entaxy.runtime.service:public
Entaxy-Main-Object: uniform-passive-service:entaxy.runtime.service:public
Provide-Capability: entaxy.runtime.service;factory:String="uniform-based-soap-service-protected";routeContainerType:String="OBJECT";displayName:String="";scope:String="public";name:String="uniform-passive-service";resources:List&lt;String&gt;="schemas:uniform-service/soap-passive.wsdl;runtime,object-resources:entaxy.runtime.service.uniform-passive-service/operationRouter.xml;DESIGN";label:String="service,soap,uniform";objectId:String="uniform-passive-service";isRouteContainer:String="true"
Bundle-SymbolicName: entaxy.runtime.service.uniform-passive-service
</manifest>
<!--
BEGIN secure vaults lookup components
-->
<bean activation="eager" class="ru.entaxy.platform.services.runtime.impl.EntaxyServiceConnectorRegistry" id="uniform-passive-service-in-connector-registry">
<property name="profileNameHeaders">
<list value-type="java.lang.String">
<value>X-SystemName</value>
</list>
</property>
</bean>
<reference-list availability="optional" filter="(service=uniform-service-in)" interface="ru.entaxy.platform.services.runtime.EntaxyServiceConnectorInfo">
<reference-listener bind-method="register" ref="uniform-passive-service-in-connector-registry" unbind-method="unregister"/>
</reference-list>
<bean activation="eager" class="ru.entaxy.platform.services.runtime.impl.EntaxyServiceConnectorRegistry" id="uniform-passive-service-out-connector-registry">
<property name="profileNameHeaders">
<list value-type="java.lang.String">
<value>X-SystemName</value>
</list>
</property>
</bean>
<reference-list availability="optional" filter="(service=uniform-service-out)" id="connectorOutList" interface="ru.entaxy.platform.services.runtime.EntaxyServiceConnectorInfo">
<reference-listener bind-method="register" ref="uniform-passive-service-out-connector-registry" unbind-method="unregister"/>
</reference-list>
<!--
BEGIN secure vaults lookup components
-->
<bean activation="eager" class="ru.entaxy.security.vault.runtime.lookup.CmPropertiesDefaultsLookup" id="vaults.data.provider">
<property name="bundleContext" ref="blueprintBundleContext"/>
</bean>
<cm:property-placeholder xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.4.0" defaults-ref="vaults.data.provider" id="vaults.lookup.placholder" persistent-id="entaxy.secrets" placeholder-prefix="$ENTAXY_SECRETS{" placeholder-suffix="}" update-strategy="reload">
</cm:property-placeholder>
<bean activation="eager" class="ru.entaxy.security.vault.runtime.camel.EntaxyVaultAccessorFunction" id="vaults.data.provider.camel">
</bean>
<!-- xmlns:soap-type="http://www.entaxy.ru/ExchangeTypes/1.0" -->
<!--
factoryId: wsdl-based-soap-service-public
factoryType: entaxy.runtime.service
outputType: init
properties:
globalRoles
__errorHandler
mtomEnabled
schemaValidationEnabled
__globalOptions
##vaults
authorizationType
operationRouter
restrictByRoles
errorHandlerType
generateLoggingKey
serviceFullName
address
dataFormat
_serviceMetadata
serviceName
displayServiceSchema
deadLetterUri
schemaUrl
##publish
port
connectorDispatchingBeans
authorizationRealm
serviceNamespace
-->
<camelcxf:cxfEndpoint address="/uniform-exchange" endpointName="uniform-passive-service:esbExchangeSOAP" id="uniform-passive-service-cxf-endpoint" serviceName="uniform-passive-service:esbExchange" wsdlURL="entaxy-resource://schemas/uniform-service/soap-passive.wsdl">
<camelcxf:properties>
<entry key="dataFormat" value="PAYLOAD"/>
<entry key="mtom-enabled" value="false"/>
<entry key="schema-validation-enabled" value="false"/>
</camelcxf:properties>
<camelcxf:inInterceptors>
<ref component-id="jaasLoginInterceptor"/>
<ref component-id="simpleAuthorizingInterceptor"/>
<ref component-id="resolveProfileNameInterceptor"/>
<ref component-id="resolveLoginInterceptor"/>
<!-- ref component-id="isSchemaDisplayInterceptor" / -->
<ref component-id="validator"/>
</camelcxf:inInterceptors>
</camelcxf:cxfEndpoint>
<bean class="ru.entaxy.platform.services.runtime.interceptor.SOAPValidateInterceptor" id="validator">
<property name="schemaValidationEnabled" value="false"/>
</bean>
<bean class="org.apache.cxf.interceptor.security.JAASLoginInterceptor" id="jaasLoginInterceptor">
<property name="contextName" value="karaf"/>
<property name="roleClassifier" value="RolePrincipal"/>
<property name="roleClassifierType" value="classname"/>
<property name="allowAnonymous" value="false"/>
<property name="allowNamedPrincipals" value="true"/>
</bean>
<bean class="ru.entaxy.platform.services.runtime.interceptor.ResolveProfileNameInterceptor" id="resolveProfileNameInterceptor">
</bean>
<bean class="ru.entaxy.platform.services.runtime.interceptor.ResolveLoginInterceptor" id="resolveLoginInterceptor"/>
<bean class="org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor" id="simpleAuthorizingInterceptor">
<property name="methodRolesMap">
<map>
<!-- NOT IMPLEMENTED YET -->
<!-- no wildcard support, names need to match exactly -->
<!-- entry key="addNumbers" value="ROLE_USER ROLE_ADMIN"/>
<entry key="divideNumbers" value="ROLE_ADMIN"/ -->
</map>
</property>
<!-- its possible to define global roles that apply to all WSDL operations not listed above -->
<property name="globalRoles" value="*"/>
</bean>
<!-- bean id="isSchemaDisplayInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.IsSchemaDisplayInterceptor">
<property name="isDisplayServiceSchema" value="true"/>
</bean -->
<camelContext xmlns="http://camel.apache.org/schema/blueprint" errorHandlerRef="DefaultErrorHandler" id="uniform-passive-service">
<globalOptions>
<globalOption key="CamelLogEipName" value="entaxy.runtime.service.uniform-passive-service"/>
</globalOptions>
<propertyPlaceholder id="propertiesForCamel">
<propertiesFunction ref="vaults.data.provider.camel"/>
</propertyPlaceholder>
<errorHandler id="NoErrorHandler" type="NoErrorHandler"/>
<errorHandler id="DefaultErrorHandler" redeliveryPolicyRef="redeliveryPolicyProfileBean" type="DefaultErrorHandler"/>
<errorHandler deadLetterUri="log:myLog" id="DeadLetterChannel" redeliveryPolicyRef="redeliveryPolicyProfileBean" type="DeadLetterChannel"/>
<redeliveryPolicyProfile id="redeliveryPolicyProfileBean"/>
<route id="uniform-passive-service-cxf-endpoint" streamCache="true">
<from uri="cxf:bean:uniform-passive-service-cxf-endpoint"/>
<setHeader name="ENTAXY_EndpointName">
<simple>uniform-passive-service</simple>
</setHeader>
<setProperty name="service">
<constant>uniform-passive-service</constant>
</setProperty>
<setProperty name="operation">
<simple>${headers.CamelHttpMethod}</simple>
</setProperty>
<setProperty name="objectId">
<simple>${headers.ENTAXY_MessageUUID}</simple>
</setProperty>
<setProperty name="receiver">
<simple>${headers.ENTAXY_Destination}</simple>
</setProperty>
<setProperty name="sender">
<simple>${headers.X-User}</simple>
</setProperty>
<to uri="direct-vm:fill-logging-key"/>
<to uri="direct:uniform-passive-service-operation-router"/>
<removeProperties excludePattern="Camel*" pattern="NTX.+|ENTAXY.+"/>
</route>
<route>
<from uri="direct:uniform-passive-service-operation-router"/>
<choice>
<when>
<simple>${headers.operationName} == 'PutPackets'</simple>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Called operation: ${headers.operationName} with message-type: ${header.message-type}"/>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Sending to connector: in"/>
<log loggingLevel="TRACE" message="${headers.NTX_loggingKey} Body: ${body}"/>
<to uri="bean:uniform-passive-service-in-connector-registry?method=inConnectorFind"/>
<choice>
<when>
<simple>${headers.NTX_targetConnector} != null</simple>
<setProperty name="NTX_TMP_targetConnector">
<simple>${headers.NTX_targetConnector}</simple>
</setProperty>
<removeHeader headerName="NTX_targetConnector"/>
<toD uri="${exchangeProperty.NTX_TMP_targetConnector}"/>
</when>
<otherwise>
<log loggingLevel="ERROR" message="${headers.NTX_loggingKey} Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=in"/>
<throwException exceptionType="ru.entaxy.platform.services.runtime.exceptions.ConnectorNotFound" message="Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=in"/>
</otherwise>
</choice>
</when>
<when>
<simple>${headers.operationName} == 'ConfirmGettingPackets'</simple>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Called operation: ${headers.operationName}"/>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Sending to connector: out"/>
<to uri="bean:uniform-passive-service-out-connector-registry?method=outConnectorFind"/>
<choice>
<when>
<simple>${headers.NTX_targetConnector} != null</simple>
<setProperty name="NTX_TMP_targetConnector">
<simple>${headers.NTX_targetConnector}</simple>
</setProperty>
<removeHeader headerName="NTX_targetConnector"/>
<toD uri="${exchangeProperty.NTX_TMP_targetConnector}"/>
</when>
<otherwise>
<log loggingLevel="ERROR" message="${headers.NTX_loggingKey} Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"/>
<throwException exceptionType="ru.entaxy.platform.services.runtime.exceptions.ConnectorNotFound" message="Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"/>
</otherwise>
</choice>
</when>
<when>
<simple>${headers.operationName} == 'GetPackets'</simple>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Called operation: ${headers.operationName}"/>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Sending to connector: out"/>
<to uri="bean:uniform-passive-service-out-connector-registry?method=outConnectorFind"/>
<choice>
<when>
<simple>${headers.NTX_targetConnector} != null</simple>
<setProperty name="NTX_TMP_targetConnector">
<simple>${headers.NTX_targetConnector}</simple>
</setProperty>
<removeHeader headerName="NTX_targetConnector"/>
<toD uri="${exchangeProperty.NTX_TMP_targetConnector}"/>
</when>
<otherwise>
<log loggingLevel="ERROR" message="${headers.NTX_loggingKey} Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"/>
<throwException exceptionType="ru.entaxy.platform.services.runtime.exceptions.ConnectorNotFound" message="Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"/>
</otherwise>
</choice>
</when>
<otherwise>
<log loggingLevel="ERROR" message="${headers.NTX_loggingKey} Uniform service operation ${header.operationName} isn't support"/>
<throwException exceptionType="java.lang.IllegalArgumentException" message="Uniform service operation ${header.operationName} isn't support"/>
</otherwise>
</choice>
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,26 @@
###
# ~~~~~~licensing~~~~~~
# uniform-service
# ==========
# Copyright (C) 2020 - 2024 EmDev LLC
# ==========
# You may not use this file except in accordance with the License Terms of the Copyright
# Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
# rights to the Software and any copies are the property of the Copyright Holder. Unless
# it is explicitly allowed the Copyright Holder, the User is prohibited from using the
# Software for commercial purposes to provide services to third parties.
#
# The Copyright Holder hereby declares that the Software is provided on an "AS IS".
# Under no circumstances does the Copyright Holder guarantee or promise that the
# Software provided by him will be suitable or not suitable for the specific purposes
# of the User, that the Software will meet all commercial and personal subjective
# expectations of the User, that the Software will work properly, without technical
# errors, quickly and uninterruptedly.
#
# Under no circumstances shall the Copyright Holder or its Affiliates is not liable
# to the User for any direct or indirect losses of the User, his expenses or actual
# damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
# or damage to data, property, etc.
# ~~~~~~/licensing~~~~~~
###
entaxy.runtime.service/uniform-passive-service/1.0.0/xml/blueprint=shared;blueprint;120

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<route>
<from uri="direct:uniform-passive-service-operation-router"/>
<choice>
<when>
<simple>${headers.operationName} == 'PutPackets'</simple>
<log loggingLevel="DEBUG"
message="${headers.NTX_loggingKey} Called operation: ${headers.operationName} with message-type: ${header.message-type}"/>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Sending to connector: in"/>
<log loggingLevel="TRACE" message="${headers.NTX_loggingKey} Body: ${body}"/>
<to uri="bean:uniform-passive-service-in-connector-registry?method=inConnectorFind"/>
<choice>
<when>
<simple>${headers.NTX_targetConnector} != null</simple>
<setProperty name="NTX_TMP_targetConnector">
<simple>${headers.NTX_targetConnector}</simple>
</setProperty>
<removeHeader headerName="NTX_targetConnector"/>
<toD uri="${exchangeProperty.NTX_TMP_targetConnector}"/>
</when>
<otherwise>
<log message="${headers.NTX_loggingKey} Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=in"
loggingLevel="ERROR"/>
<throwException
exceptionType="ru.entaxy.platform.services.runtime.exceptions.ConnectorNotFound"
message="Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=in"/>
</otherwise>
</choice>
</when>
<when>
<simple>${headers.operationName} == 'ConfirmGettingPackets'</simple>
<log loggingLevel="DEBUG"
message="${headers.NTX_loggingKey} Called operation: ${headers.operationName}"/>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Sending to connector: out"/>
<to uri="bean:uniform-passive-service-out-connector-registry?method=outConnectorFind"/>
<choice>
<when>
<simple>${headers.NTX_targetConnector} != null</simple>
<setProperty name="NTX_TMP_targetConnector">
<simple>${headers.NTX_targetConnector}</simple>
</setProperty>
<removeHeader headerName="NTX_targetConnector"/>
<toD uri="${exchangeProperty.NTX_TMP_targetConnector}"/>
</when>
<otherwise>
<log message="${headers.NTX_loggingKey} Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"
loggingLevel="ERROR"/>
<throwException
exceptionType="ru.entaxy.platform.services.runtime.exceptions.ConnectorNotFound"
message="Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"/>
</otherwise>
</choice>
</when>
<when>
<simple>${headers.operationName} == 'GetPackets'</simple>
<log loggingLevel="DEBUG"
message="${headers.NTX_loggingKey} Called operation: ${headers.operationName}"/>
<log loggingLevel="DEBUG" message="${headers.NTX_loggingKey} Sending to connector: out"/>
<to uri="bean:uniform-passive-service-out-connector-registry?method=outConnectorFind"/>
<choice>
<when>
<simple>${headers.NTX_targetConnector} != null</simple>
<setProperty name="NTX_TMP_targetConnector">
<simple>${headers.NTX_targetConnector}</simple>
</setProperty>
<removeHeader headerName="NTX_targetConnector"/>
<toD uri="${exchangeProperty.NTX_TMP_targetConnector}"/>
</when>
<otherwise>
<log message="${headers.NTX_loggingKey} Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"
loggingLevel="ERROR"/>
<throwException
exceptionType="ru.entaxy.platform.services.runtime.exceptions.ConnectorNotFound"
message="Connector not found: service=uniform-service; profile=${headers[X-SystemName]}; direction=out"/>
</otherwise>
</choice>
</when>
<otherwise>
<log message="${headers.NTX_loggingKey} Uniform service operation ${header.operationName} isn't support"
loggingLevel="ERROR"/>
<throwException exceptionType="java.lang.IllegalArgumentException"
message="Uniform service operation ${header.operationName} isn't support"/>
</otherwise>
</choice>
</route>