release version 1.11.0

This commit is contained in:
2025-07-10 23:47:05 +03:00
parent 5cb6857fa1
commit 8dd9cf9cf2
3082 changed files with 278464 additions and 1833 deletions

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>objects-implementations</artifactId>
<version>1.10.0</version>
<version>1.11.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>service-implementation</artifactId>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>service-implementation</artifactId>
<version>1.10.0</version>
<version>1.11.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.service-implementation</groupId>
<artifactId>service-producing</artifactId>
@ -12,12 +12,6 @@
<name>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: SERVICE :: PRODUCING</name>
<description>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: SERVICE :: PRODUCING</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.platform.core.objects.service.producing
</bundle.osgi.export.pkg>
</properties>
<dependencies>
<dependency>
<groupId>
@ -41,12 +35,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.0.2.Final</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-security-oauth2</artifactId>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connector-producing
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -18,6 +18,16 @@
"transmitAlways": true
}
},
"displayName": {
"type": "String",
"required": true,
"defaultValue": {
"@CALCULATED": {
"expression": "${objectId}",
"lazy": true
}
}
},
"generateLoggingKey": {
"displayName": "Generate logging key",
"description": "Enable to automatically create a logging key that will be used to track the request processing. (${exchangeProperty.requestId}, ${exchangeProperty.service}, ${exchangeProperty.operation}, ${exchangeProperty.objectId}, ${exchangeProperty.parameter}, ${exchangeProperty.sender}, ${exchangeProperty.receiver})",

View File

@ -0,0 +1,26 @@
{
"factory": {
"id": "abstract-service-rest-connector-out",
"type": "entaxy.runtime.connector",
"description": "Factory abstract-service-rest-connector-out of entaxy.runtime.connector",
"parent": "abstract-connector-out",
"isAbstract": true
},
"entaxy.runtime.connector": {
"exclusiveMode": "NON_EXCLUSIVE_ONLY",
"type": "service-rest",
"protocol": "service-rest",
"serviceType": "REST"
},
"fields": {},
"outputs": {
"init": {
"isDefault": true,
"fields": {
},
"config": {
"configurable": true
}
}
}
}

View File

@ -0,0 +1,459 @@
{
"factory": {
"id": "openapi-based-rest-client",
"displayName": "REST :: OPENAPI :: CLIENT",
"type": "entaxy.runtime.service",
"description": "Public openapi-based REST service client. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Rest_services.html\">Entaxy docs</a>",
"isAbstract": false,
"parent": "openapi-based-rest-service-public",
"label": "service,rest",
"category": ""
},
"entaxy.runtime.service": {
"serviceScope": "protected"
},
"fields": {
"operationRouter": {
"defaultValue": {
"@RESOURCE": {
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties._serviceMetadata.serviceResourcesRoot}/operationRouterClient.xml"
}
}
}
},
"@TYPEINFO": {
"location": "${serviceResourcesRoot}/operationRouterClient.xml"
}
},
"connectorOutFactory": {
"type": "factory",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"_isRef": true,
"_isRefByValueOnly": true,
"@RESOURCE": {
"endType": "String",
"provider": "service-resources",
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties._serviceMetadata.serviceResourcesRoot}/${#OWNER#.objectId}/${#OWNER#.objectId}-connector-out.factory",
"lazy": false
}
},
"service": {
"@CALCULATED": {
"expression": "${#OWNER#.properties._serviceMetadata}",
"resultType": "map",
"blacklistContent": [
"@RESOURCE_META"
],
"lazy": false
}
}
},
"defaultValue": {
"type": "entaxy.runtime.service",
"factoryId": "#OWNER#",
"outputType": "connectorOutFactory",
"scope": "public",
"properties": {
"service": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.properties._serviceMetadata}",
"resultType": "map",
"blacklistContent": [
"@RESOURCE_META"
],
"lazy": false
}
},
"serviceId": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.objectId}",
"resultType": "String",
"lazy": false
}
},
"serviceObjectType": "entaxy.runtime.service",
"serviceType": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.#FACTORY#.#TYPEINFO#.serviceType}",
"resultType": "String",
"lazy": false
}
},
"location": {
"@CALCULATED": {
"lazy": false,
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.properties._serviceMetadata.serviceResourcesRoot}/operationRouterConnectorOut.xml"
}
}
},
"refConfig": {
"isRefByValueOnly": true
}
}
},
"##headers": {
"type": "List",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"defaultValue": [
{
"name": "Entaxy-Dynamic-Factory-Provider",
"type": "boolean",
"value": true
},
{
"name": "Entaxy-Dynamic-Factory-Url",
"type": "List",
"value": [
{
"@CALCULATED": {
"expression": "entaxy-resource://service-resources/${properties._serviceMetadata.serviceResourcesRoot}/${objectId}/${objectId}-connector-out.factory",
"lazy": false,
"resultType": "String"
}
}
]
}
]
},
"camelContextId": {
"type": "String",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"defaultValue": {
"@CALCULATED": {
"expression": "openapi-client-${objectId}-context",
"fallbackObject": null,
"lazy": false,
"resultType": "String"
}
}
},
"authPassword": {
"displayName": "Auth Password",
"description": "Authentication password",
"type": "password",
"required": false,
"hidden": false,
"group": "security"
},
"authUsername": {
"displayName": "Auth Username",
"description": "Authentication username",
"type": "string",
"required": false,
"hidden": false,
"group": "security"
},
"authorizationType": {
"isHidden": true
},
"authorizationRealm": {
"isHidden": true
},
"displayServiceSchema": {
"isHidden": true
},
"restrictByRoles": {
"isHidden": true
},
"globalRoles": {
"isHidden": true
},
"jwtAuthzFilterRegexp": {
"isHidden": true
},
"jwtAuthzFilterRoleClaim": {
"isHidden": true
},
"jwtAuthzFilterValidateAudience": {
"isHidden": true
},
"jwtKeystore": {
"isHidden": true
},
"jwtAlias": {
"isHidden": true
},
"audienceIsEndpointAddress": {
"isHidden": true
},
"introspectContentType": {
"isHidden": true
},
"introspectAuthorizationLogin": {
"isHidden": true
},
"introspectAuthorizationPasswordVault": {
"isHidden": true
},
"introspectAccept": {
"isHidden": true
},
"introspectAddress": {
"isHidden": true
},
"introspectHttpReceiveTimeout": {
"isHidden": true
}
},
"outputs": {
"init": {
"isDefault": true,
"generator": "",
"config": {},
"fields": {
"camelContextId": {},
"authPassword": {},
"authUsername": {},
"address": {
"displayName": "Absolute address"
},
"generateLoggingKey": {
"defaultValue": false,
"isHidden": true
},
"removeAllHeadersBeforeAnswering": {
"isHidden": true
},
"camel_headerFilterStrategy": {
"description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. For more details see <a target=\"_blank\" href=\"https://camel-docs.entaxy.ru/components/${camel-docs.version}/cxfrs-component.html\">Camel docs</a>"
},
"camel_cookieHandler": {
"description": "To use a custom org.apache.camel.http.base.cookie.CookieHandler to maintain a HTTP session. For more details see <a target=\"_blank\" href=\"https://camel-docs.entaxy.ru/components/${camel-docs.version}/cxfrs-component.html\">Camel docs</a>"
},
"camel_hostnameVerifier": {
"description": "To use a custom javax.net.ssl.HostnameVerifier. For more details see <a target=\"_blank\" href=\"https://camel-docs.entaxy.ru/components/${camel-docs.version}/cxfrs-component.html\">Camel docs</a>"
},
"camel_bus": {
"@TODO": "Now hidden, to process in next releases",
"isHidden": true
},
"camel_cxfRsConfigurer": {
"@TODO": "Now hidden, to process in next releases",
"isHidden": true
},
"camel_binding": {
"@TODO": "Now hidden, to process in next releases",
"isHidden": true
},
"camel_features": {
"@TODO": "Now hidden, to process in next releases",
"isHidden": true
},
"camel_modelRef": {
"@TODO": "Now hidden, to process in next releases",
"isHidden": true
},
"camel_resourceClasses": {
"@TODO": "Used for official purposes(case multiple api classes)",
"isHidden": true
},
"camel_schemaLocations": {
"@TODO": "consumer function",
"isHidden": true
},
"camel_exchangePattern": {
"displayName": "Exchange Pattern",
"description": "Sets the exchange pattern when the consumer creates an exchange. For more details see <a target=\"_blank\" href=\"https://camel-docs.entaxy.ru/components/${camel-docs.version}/cxfrs-component.html\">Camel docs</a>",
"label": "consumer,advanced",
"type": "String",
"kind": "parameter",
"required": false,
"hidden": false,
"group": "consumer (advanced)",
"@TYPEINFO": {
"type": "enum",
"values": [
"InOnly",
"InOut",
"InOptionalOut"
]
},
"defaultValue": "InOut",
"@UI": {
"transmitAlways": true
}
},
"@IMPORT": [
{
"sourceFactoryId": "service-components",
"location": "outputs.specificProtectedServiceComponents.fields",
"prefix": ""
},
{
"sourceFactoryId": "cxf-rs",
"location": "fields",
"prefix": "camel_",
"filter": {
"contains": [
{
"attribute": "kind",
"values": [
"parameter"
]
},
{
"attribute": "label",
"inverse": true,
"values": [
"consumer"
]
}
]
}
},
{
"sourceFactoryId": "ssl-context-parameters",
"location": "fields",
"prefix": ""
},
{
"sourceFactoryId": "header-filter-strategy",
"location": "fields",
"prefix": ""
},
{
"sourceFactoryId": "cookie-handler",
"location": "fields",
"prefix": ""
},
{
"sourceFactoryId": "hostname-verifier",
"location": "fields",
"prefix": ""
},
{
"sourceFactoryId": "oauth",
"location": "fields",
"prefix": ""
},
{
"sourceFactoryId": "#",
"location": "fields",
"prefix": "camel_",
"filter": {
"contains": [
{
"attribute": "kind",
"values": [
"parameter"
]
}
]
}
}
],
"__sslContextParametersTemplate": {
"type": "entaxy.runtime.service",
"defaultValue": {
"type": "entaxy.runtime.service"
}
},
"__headerFilterStrategyTemplate": {
"type": "entaxy.runtime.service",
"defaultValue": {
"type": "entaxy.runtime.service"
}
},
"__cookieHandlerTemplate": {
"type": "entaxy.runtime.service",
"defaultValue": {
"type": "entaxy.runtime.service"
}
},
"__hostnameVerifierTemplate": {
"type": "entaxy.runtime.service",
"defaultValue": {
"type": "entaxy.runtime.service"
}
},
"__oauthTemplate": {
"type": "entaxy.runtime.service",
"defaultValue": {
"type": "entaxy.runtime.service"
}
},
"connectorOutFactory": {},
"##headers": {}
}
},
"connectorOutFactory": {
"fields": {
"service": {},
"serviceId": {}
},
"config": {
"@SKIP_VAULTS_LOOKUP": ""
}
},
"ssl-context-parameters": {
"fields": {
"__sslContextParametersTemplate": {}
},
"scopes": [
"private"
],
"config": {
"@SKIP_PUBLISH": {},
"configurable": false
}
},
"header-filter-strategy": {
"fields": {
"__headerFilterStrategyTemplate": {}
},
"scopes": [
"private"
],
"config": {
"@SKIP_PUBLISH": {},
"configurable": false
}
},
"cookie-handler": {
"fields": {
"__cookieHandlerTemplate": {}
},
"scopes": [
"private"
],
"config": {
"@SKIP_PUBLISH": {},
"configurable": false
}
},
"hostname-verifier": {
"fields": {
"__hostnameVerifierTemplate": {}
},
"scopes": [
"private"
],
"config": {
"@SKIP_PUBLISH": {},
"configurable": false
}
},
"oauth-module": {
"fields": {
"__oauthTemplate": {}
},
"scopes": [
"private"
],
"config": {
"@SKIP_PUBLISH": {},
"configurable": false
}
}
}
}

View File

@ -28,8 +28,7 @@
"required": true,
"@TYPEINFO": {
"resourceProvider": "schemas",
"filter": "*.yaml",
"target": "resource"
"filter": "*.yaml"
}
}
}
@ -142,6 +141,7 @@
"isEmptyIncluded": true
},
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"JAAS"
],
@ -156,6 +156,7 @@
"required": true,
"defaultValue": false,
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"JAAS",
"OAUTH STAND ALONE",
@ -172,25 +173,29 @@
"group": "security",
"defaultValue": false,
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"JAAS",
"OAUTH STAND ALONE"
"OAUTH STAND ALONE",
"OAUTH INTROSPECT"
],
"required": true
}
},
"globalRoles": {
"displayName": "Roles allowed to access",
"description": "List of roles that are allowed to access the service. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a>",
"description": "List of roles that are allowed to access the service. Multiple roles can be specified, separated by commas. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a>",
"type": "String",
"required": false,
"group": "security",
"condition": "${restrictByRoles}",
"defaultValue": "*",
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"JAAS",
"OAUTH STAND ALONE"
"OAUTH STAND ALONE",
"OAUTH INTROSPECT"
],
"required": true
}
@ -203,6 +208,7 @@
"required": false,
"group": "security",
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH STAND ALONE"
],
@ -217,6 +223,7 @@
"required": false,
"group": "security",
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH STAND ALONE"
],
@ -231,6 +238,7 @@
"required": false,
"group": "security",
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH STAND ALONE"
],
@ -249,10 +257,10 @@
"*.jks",
"*.pkcs12",
"*.jwk"
],
"target": "resource"
]
},
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH STAND ALONE"
],
@ -276,6 +284,7 @@
"dependsOn": ["jwtKeystore"]
},
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH STAND ALONE"
],
@ -290,6 +299,7 @@
"required": false,
"group": "security",
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH INTROSPECT"
],
@ -304,6 +314,7 @@
"required": false,
"group": "security",
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH INTROSPECT"
],
@ -318,6 +329,7 @@
"required": false,
"group": "security",
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH INTROSPECT"
],
@ -332,6 +344,7 @@
"required": false,
"group": "security",
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH INTROSPECT"
],
@ -347,6 +360,7 @@
"isHidden": true,
"group": "security",
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH INTROSPECT"
],
@ -360,6 +374,7 @@
"required": false,
"group": "security",
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH INTROSPECT"
],
@ -375,6 +390,7 @@
"required": false,
"group": "security",
"@UI": {
"displayBlocksManagedBy": "authorizationType",
"displayBlocks": [
"OAUTH INTROSPECT"
],

View File

@ -134,6 +134,44 @@
"defaultValue": {
"outputType": "operationRouterConnector"
}
},
"operationRouterConnectorOut": {
"@IMPORT": [
{
"sourceFactoryId": "#",
"location": "fields.operationRouterFieldTemplate",
"prefix": ""
}
],
"@RESOURCE": {
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service.serviceResourcesRoot}/operationRouterConnectorOut.xml"
}
}
},
"defaultValue": {
"outputType": "operationRouterConnectorOut"
}
},
"operationRouterClient": {
"@IMPORT": [
{
"sourceFactoryId": "#",
"location": "fields.operationRouterFieldTemplate",
"prefix": ""
}
],
"@RESOURCE": {
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service.serviceResourcesRoot}/operationRouterClient.xml"
}
}
},
"defaultValue": {
"outputType": "operationRouterClient"
}
}
},
"outputs": {
@ -144,7 +182,9 @@
"parentResource": {},
"operationRouterPublic": {},
"operationRouterProtected": {},
"operationRouterConnector": {}
"operationRouterConnector": {},
"operationRouterConnectorOut": {},
"operationRouterClient": {}
},
"config": {
"configurable": false,
@ -183,6 +223,28 @@
"configurable": false,
"@SKIP_VAULTS_LOOKUP": ""
}
},
"operationRouterConnectorOut": {
"isDefault": false,
"fields": {
"service": {},
"parentResource": {}
},
"config": {
"configurable": false,
"@SKIP_VAULTS_LOOKUP": ""
}
},
"operationRouterClient": {
"isDefault": false,
"fields": {
"service": {},
"parentResource": {}
},
"config": {
"configurable": false,
"@SKIP_VAULTS_LOOKUP": ""
}
}
}
}

View File

@ -0,0 +1,26 @@
{
"factory": {
"id": "abstract-service-soap-connector-out",
"type": "entaxy.runtime.connector",
"description": "Factory abstract-service-soap-connector-out of entaxy.runtime.connector",
"parent": "abstract-connector-out",
"isAbstract": true
},
"entaxy.runtime.connector": {
"exclusiveMode": "NON_EXCLUSIVE_ONLY",
"type": "service-soap",
"protocol": "service-soap",
"serviceType": "SOAP"
},
"fields": {},
"outputs": {
"init": {
"isDefault": true,
"fields": {
},
"config": {
"configurable": true
}
}
}
}

View File

@ -0,0 +1,400 @@
{
"factory": {
"id": "wsdl-based-soap-client",
"displayName": "SOAP :: WSDL :: CLIENT",
"type": "entaxy.runtime.service",
"description": "Protected WSDL-based SOAP client",
"isAbstract": false,
"parent": "wsdl-based-soap-service-public",
"label": "service,soap",
"category": ""
},
"entaxy.runtime.service": {
"serviceScope": "protected"
},
"fields": {
"operationRouter": {
"defaultValue": {
"@RESOURCE": {
"location": {
"@CALCULATED": {
"lazy": false,
"expression": "${#OWNER#.properties._serviceMetadata.serviceResourcesRoot}/${#OWNER#.properties.port}/operationRouterPublic.xml"
}
}}
},
"@TYPEINFO": {
"location": "${serviceResourcesRoot}/${port}/operationRouter.xml"
}
},
"authorizationType": {
"isHidden": true,
"defaultValue": "JAAS"
},
"connectorOutFactory": {
"type": "factory",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"_isRef": true,
"_isRefByValueOnly": true,
"@RESOURCE": {
"endType": "String",
"provider": "service-resources",
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties._serviceMetadata.serviceResourcesRoot}/${#OWNER#.objectId}/${#OWNER#.objectId}-connector-out.factory",
"lazy": false
}
},
"service": {
"@CALCULATED": {
"expression": "${#OWNER#.properties._serviceMetadata}",
"resultType": "map",
"blacklistContent": ["@RESOURCE_META"],
"lazy": false
}
}
},
"defaultValue": {
"type": "entaxy.runtime.service",
"factoryId": "#OWNER#",
"outputType": "connectorOutFactory",
"scope": "public",
"properties": {
"service": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.properties._serviceMetadata}",
"resultType": "map",
"blacklistContent": ["@RESOURCE_META"],
"lazy": false
}
},
"serviceId": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.objectId}",
"resultType": "String",
"lazy": false
}
},
"serviceObjectType": "entaxy.runtime.service",
"serviceType": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.#FACTORY#.#TYPEINFO#.serviceType}",
"resultType": "String",
"lazy": false
}
},
"location": {
"@CALCULATED": {
"lazy": false,
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.properties._serviceMetadata.serviceResourcesRoot}/${#OWNER_OF_TYPE:entaxy.runtime.service#.properties.port}/operationRouterConnectorOut.xml"
}
}
},
"refConfig": {
"isRefByValueOnly": true
}
}
},
"authPassword": {
"displayName": "Auth Password",
"description": "Authentication password",
"type": "password",
"required": false,
"hidden": false,
"group": "security"
},
"authUsername": {
"displayName": "Auth Username",
"description": "Authentication username",
"type": "string",
"required": false,
"hidden": false,
"group": "security"
},
"wrapped": {
"displayName": "Wrapped",
"description": "Which kind of operation that CXF endpoint producer will invoke",
"label": "producer",
"type": "boolean",
"kind": "parameter",
"required": false,
"isHidden": false,
"defaultValue": false,
"group": "producer",
"##origin": "camel",
"##camelDiff": {
"javaType": "boolean",
"deprecated": false
}
},
"defaultOperationName": {
"displayName": "Default Operation Name",
"description": "This option will set the default operationName that will be used by the CxfProducer which invokes the remote service.",
"label": "producer",
"type": "string",
"kind": "parameter",
"required": false,
"isHidden": false,
"group": "producer",
"##origin": "camel",
"##camelDiff": {
"javaType": "java.lang.String",
"deprecated": false
}
},
"defaultOperationNamespace": {
"displayName": "Default Operation Namespace",
"description": "This option will set the default operationNamespace that will be used by the CxfProducer which invokes the remote service.",
"label": "producer",
"type": "string",
"kind": "parameter",
"required": false,
"isHidden": false,
"group": "producer",
"##origin": "camel",
"##camelDiff": {
"javaType": "java.lang.String",
"deprecated": false
}
},
"allowStreaming": {
"displayName": "Allow Streaming",
"description": "This option controls whether the CXF component, when running in PAYLOAD mode, will DOM parse the incoming messages into DOM Elements or keep the payload as a javax.xml.transform.Source object that would allow streaming in some cases.",
"label": "advanced",
"type": "boolean",
"required": false,
"isHidden": false,
"group": "advanced",
"##origin": "camel",
"kind": [
"property",
"parameter"
],
"##camelDiff": {
"old": {
"javaType": "java.lang.Boolean",
"deprecated": false
},
"new": {
"javaType": "java.lang.Boolean",
"deprecated": false
}
}
},
"mergeProtocolHeaders": {
"displayName": "Merge Protocol Headers",
"description": "Whether to merge protocol headers. If enabled then propagating headers between Camel and CXF becomes more consistent and similar. For more details see CAMEL-6393.",
"label": "advanced",
"type": "boolean",
"kind": "parameter",
"required": false,
"isHidden": false,
"defaultValue": false,
"group": "advanced",
"##origin": "camel",
"##camelDiff": {
"javaType": "boolean",
"deprecated": false
}
},
"skipPayloadMessagePartCheck": {
"displayName": "Skip Payload Message Part Check",
"description": "Sets whether SOAP message validation should be disabled.",
"label": "advanced",
"type": "boolean",
"kind": "parameter",
"required": false,
"isHidden": false,
"defaultValue": false,
"group": "advanced",
"##origin": "camel",
"##camelDiff": {
"javaType": "boolean",
"deprecated": false
}
},
"synchronous": {
"displayName": "Synchronous",
"description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).",
"label": "advanced",
"type": "boolean",
"kind": "parameter",
"required": false,
"isHidden": false,
"defaultValue": false,
"group": "advanced",
"##origin": "camel",
"##camelDiff": {
"javaType": "boolean",
"deprecated": false
}
},
"lazyStartProducer": {
"displayName": "Lazy Start Producer",
"description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel\u0027s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.",
"label": "producer",
"type": "boolean",
"required": false,
"isHidden": false,
"defaultValue": false,
"group": "producer",
"##origin": "camel",
"kind": [
"property",
"parameter"
],
"##camelDiff": {
"old": {
"javaType": "boolean",
"deprecated": false
},
"new": {
"javaType": "boolean",
"deprecated": false
}
}
},
"##headers": {
"type": "List",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"defaultValue": [
{
"name": "Entaxy-Dynamic-Factory-Provider",
"type": "boolean",
"value": true
},
{
"name": "Entaxy-Dynamic-Factory-Url",
"type": "List",
"value": [
{"@CALCULATED": {
"expression": "entaxy-resource://service-resources/${properties._serviceMetadata.serviceResourcesRoot}/${objectId}/${objectId}-connector-out.factory",
"lazy": false,
"resultType": "String"
}}
]
}
]
}
},
"outputs": {
"init": {
"isDefault": true,
"generator": "",
"config": {},
"fields": {
"address": {
"displayName": "Absolute address"
},
"generateLoggingKey": {
"defaultValue": false,
"isHidden": true
},
"authPassword": {},
"authUsername": {},
"removeAllHeadersBeforeAnswering": {
"isHidden": true
},
"authorizationRealm": {
"isHidden": true
},
"displayServiceSchema": {
"isHidden": true
},
"restrictByRoles": {
"isHidden": true
},
"globalRoles": {
"isHidden": true
},
"camel_headerFilterStrategy": {
"description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. For more details see <a target=\"_blank\" href=\"https://camel-docs.entaxy.ru/components/${camel-docs.version}/cxf-component.html\">Camel docs</a>"
},
"@IMPORT": [
{
"sourceFactoryId": "service-components",
"location": "outputs.specificProtectedServiceComponents.fields",
"prefix": ""
},
{
"sourceFactoryId": "ssl-context-parameters",
"location": "fields",
"prefix": ""
},
{
"sourceFactoryId": "header-filter-strategy",
"location": "fields",
"prefix": ""
},
{
"sourceFactoryId": "#",
"location": "fields",
"prefix": "camel_",
"filter": {
"contains": [
{
"attribute": "kind",
"values": [
"parameter"
]
}
]
}
}
],
"__sslContextParametersTemplate":{
"type": "entaxy.runtime.service",
"defaultValue": {
"type": "entaxy.runtime.service"
}
},
"__headerFilterStrategyTemplate":{
"type": "entaxy.runtime.service",
"defaultValue": {
"type": "entaxy.runtime.service"
}
},
"connectorOutFactory": {},
"##headers": {}
}
},
"connectorOutFactory": {
"fields": {
"service": {},
"serviceId": {}
},
"config": {
"@SKIP_VAULTS_LOOKUP": ""
}
},
"ssl-context-parameters": {
"fields": {
"__sslContextParametersTemplate":{
}
},
"scopes": ["private"],
"config": {
"@SKIP_PUBLISH": {},
"configurable": false
}
},
"header-filter-strategy": {
"fields": {
"__headerFilterStrategyTemplate":{
}
},
"scopes": ["private"],
"config": {
"@SKIP_PUBLISH": {},
"configurable": false
}
}
}
}

View File

@ -38,8 +38,17 @@
}
}
}
},
"operationRouterConnectorOut": {
"@RESOURCE": {
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service.serviceResourcesRoot}/${#OWNER#.properties.service.port.portName}/operationRouterConnectorOut.xml"
}
}
}
}
},
"outputs": {}
}

View File

@ -89,10 +89,20 @@
"schemaValidationEnabled": {
"displayName": "Schema Validation Enabled",
"description": "Enables schema validation for messages. Throws an exception if the message does not comply with the specified XML schema. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Soap_services.html\">Entaxy docs</a>",
"type": "Boolean",
"type": "string",
"required": true,
"group": "main",
"defaultValue": false
"defaultValue": "NONE",
"@TYPEINFO": {
"type": "enum",
"values": [
"NONE",
"IN",
"OUT",
"BOTH"
],
"isEmptyIncluded": false
}
},
"_serviceMetadata": {
"type": "Map",

View File

@ -66,6 +66,12 @@
</otherwise>
</xsl:template>
<xsl:template match="//route//set-operation" exclude-result-prefixes="xsl fn xs local">
<setHeader name="operationName" xmlns="http://camel.apache.org/schema/blueprint">
<simple><xsl:value-of select="./text()" /></simple>
</setHeader>
</xsl:template>
<xsl:template name="default-copy" match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*" />

View File

@ -66,6 +66,12 @@
</otherwise>
</xsl:template>
<xsl:template match="//route//set-operation" exclude-result-prefixes="xsl fn xs local">
<setHeader name="operationName" xmlns="http://camel.apache.org/schema/blueprint">
<constant><xsl:value-of select="./text()" /></constant>
</setHeader>
</xsl:template>
<xsl:template name="default-copy" match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*" />

View File

@ -0,0 +1,806 @@
openapi: 3.0.3
info:
title: Swagger Petstore - OpenAPI 3.0
description: |-
This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about
Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!
You can now help us improve the API whether it's by making changes to the definition itself or to the code.
That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
_If you're looking for the Swagger 2.0/OAS 2.0 version of Petstore, then click [here](https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml). Alternatively, you can load via the `Edit > Load Petstore OAS 2.0` menu option!_
Some useful links:
- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
termsOfService: http://swagger.io/terms/
contact:
email: apiteam@swagger.io
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.11
externalDocs:
description: Find out more about Swagger
url: http://swagger.io
servers:
- url: https://petstore3.swagger.io/api/v3
tags:
- name: pet
description: Everything about your Pets
externalDocs:
description: Find out more
url: http://swagger.io
- name: store
description: Access to Petstore orders
externalDocs:
description: Find out more about our store
url: http://swagger.io
- name: user
description: Operations about user
paths:
/pet:
put:
tags:
- pet
summary: Update an existing pet
description: Update an existing pet by Id
operationId: updatePet
requestBody:
description: Update an existent pet in the store
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
application/xml:
schema:
$ref: '#/components/schemas/Pet'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Pet'
required: true
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
application/xml:
schema:
$ref: '#/components/schemas/Pet'
'400':
description: Invalid ID supplied
'404':
description: Pet not found
'422':
description: Validation exception
security:
- petstore_auth:
- write:pets
- read:pets
post:
tags:
- pet
summary: Add a new pet to the store
description: Add a new pet to the store
operationId: addPet
requestBody:
description: Create a new pet in the store
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
application/xml:
schema:
$ref: '#/components/schemas/Pet'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Pet'
required: true
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
application/xml:
schema:
$ref: '#/components/schemas/Pet'
'400':
description: Invalid input
'422':
description: Validation exception
security:
- petstore_auth:
- write:pets
- read:pets
/pet/findByStatus:
get:
tags:
- pet
summary: Finds Pets by status
description: Multiple status values can be provided with comma separated strings
operationId: findPetsByStatus
parameters:
- name: status
in: query
description: Status values that need to be considered for filter
required: false
explode: true
schema:
type: string
default: available
enum:
- available
- pending
- sold
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
application/xml:
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
'400':
description: Invalid status value
security:
- petstore_auth:
- write:pets
- read:pets
/pet/findByTags:
get:
tags:
- pet
summary: Finds Pets by tags
description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
operationId: findPetsByTags
parameters:
- name: tags
in: query
description: Tags to filter by
required: false
explode: true
schema:
type: array
items:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
application/xml:
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
'400':
description: Invalid tag value
security:
- petstore_auth:
- write:pets
- read:pets
/pet/{petId}:
get:
tags:
- pet
summary: Find pet by ID
description: Returns a single pet
operationId: getPetById
parameters:
- name: petId
in: path
description: ID of pet to return
required: true
schema:
type: integer
format: int64
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
application/xml:
schema:
$ref: '#/components/schemas/Pet'
'400':
description: Invalid ID supplied
'404':
description: Pet not found
security:
- api_key: []
- petstore_auth:
- write:pets
- read:pets
post:
tags:
- pet
summary: Updates a pet in the store with form data
description: ''
operationId: updatePetWithForm
parameters:
- name: petId
in: path
description: ID of pet that needs to be updated
required: true
schema:
type: integer
format: int64
- name: name
in: query
description: Name of pet that needs to be updated
schema:
type: string
- name: status
in: query
description: Status of pet that needs to be updated
schema:
type: string
responses:
'400':
description: Invalid input
security:
- petstore_auth:
- write:pets
- read:pets
delete:
tags:
- pet
summary: Deletes a pet
description: delete a pet
operationId: deletePet
parameters:
- name: api_key
in: header
description: ''
required: false
schema:
type: string
- name: petId
in: path
description: Pet id to delete
required: true
schema:
type: integer
format: int64
responses:
'400':
description: Invalid pet value
security:
- petstore_auth:
- write:pets
- read:pets
/pet/{petId}/uploadImage:
post:
tags:
- pet
summary: uploads an image
description: ''
operationId: uploadFile
parameters:
- name: petId
in: path
description: ID of pet to update
required: true
schema:
type: integer
format: int64
- name: additionalMetadata
in: query
description: Additional Metadata
required: false
schema:
type: string
requestBody:
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
security:
- petstore_auth:
- write:pets
- read:pets
/store/inventory:
get:
tags:
- store
summary: Returns pet inventories by status
description: Returns a map of status codes to quantities
operationId: getInventory
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: object
additionalProperties:
type: integer
format: int32
security:
- api_key: []
/store/order:
post:
tags:
- store
summary: Place an order for a pet
description: Place a new order in the store
operationId: placeOrder
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
application/xml:
schema:
$ref: '#/components/schemas/Order'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Order'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
'400':
description: Invalid input
'422':
description: Validation exception
/store/order/{orderId}:
get:
tags:
- store
summary: Find purchase order by ID
description: For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.
operationId: getOrderById
parameters:
- name: orderId
in: path
description: ID of order that needs to be fetched
required: true
schema:
type: integer
format: int64
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
application/xml:
schema:
$ref: '#/components/schemas/Order'
'400':
description: Invalid ID supplied
'404':
description: Order not found
delete:
tags:
- store
summary: Delete purchase order by ID
description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
operationId: deleteOrder
parameters:
- name: orderId
in: path
description: ID of the order that needs to be deleted
required: true
schema:
type: integer
format: int64
responses:
'400':
description: Invalid ID supplied
'404':
description: Order not found
/user:
post:
tags:
- user
summary: Create user
description: This can only be done by the logged in user.
operationId: createUser
requestBody:
description: Created user object
content:
application/json:
schema:
$ref: '#/components/schemas/User'
application/xml:
schema:
$ref: '#/components/schemas/User'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/User'
responses:
default:
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/User'
application/xml:
schema:
$ref: '#/components/schemas/User'
/user/createWithList:
post:
tags:
- user
summary: Creates list of users with given input array
description: Creates list of users with given input array
operationId: createUsersWithListInput
requestBody:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/User'
application/xml:
schema:
$ref: '#/components/schemas/User'
default:
description: successful operation
/user/login:
get:
tags:
- user
summary: Logs user into the system
description: ''
operationId: loginUser
parameters:
- name: username
in: query
description: The user name for login
required: false
schema:
type: string
- name: password
in: query
description: The password for login in clear text
required: false
schema:
type: string
responses:
'200':
description: successful operation
headers:
X-Rate-Limit:
description: calls per hour allowed by the user
schema:
type: integer
format: int32
X-Expires-After:
description: date in UTC when token expires
schema:
type: string
format: date-time
content:
application/xml:
schema:
type: string
application/json:
schema:
type: string
'400':
description: Invalid username/password supplied
/user/logout:
get:
tags:
- user
summary: Logs out current logged in user session
description: ''
operationId: logoutUser
parameters: []
responses:
default:
description: successful operation
/user/{username}:
get:
tags:
- user
summary: Get user by user name
description: ''
operationId: getUserByName
parameters:
- name: username
in: path
description: 'The name that needs to be fetched. Use user1 for testing. '
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/User'
application/xml:
schema:
$ref: '#/components/schemas/User'
'400':
description: Invalid username supplied
'404':
description: User not found
put:
tags:
- user
summary: Update user
description: This can only be done by the logged in user.
operationId: updateUser
parameters:
- name: username
in: path
description: name that need to be deleted
required: true
schema:
type: string
requestBody:
description: Update an existent user in the store
content:
application/json:
schema:
$ref: '#/components/schemas/User'
application/xml:
schema:
$ref: '#/components/schemas/User'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/User'
responses:
default:
description: successful operation
delete:
tags:
- user
summary: Delete user
description: This can only be done by the logged in user.
operationId: deleteUser
parameters:
- name: username
in: path
description: The name that needs to be deleted
required: true
schema:
type: string
responses:
'400':
description: Invalid username supplied
'404':
description: User not found
components:
schemas:
Order:
type: object
properties:
id:
type: integer
format: int64
example: 10
petId:
type: integer
format: int64
example: 198772
quantity:
type: integer
format: int32
example: 7
shipDate:
type: string
format: date-time
status:
type: string
description: Order Status
example: approved
enum:
- placed
- approved
- delivered
complete:
type: boolean
xml:
name: order
Customer:
type: object
properties:
id:
type: integer
format: int64
example: 100000
username:
type: string
example: fehguy
address:
type: array
xml:
name: addresses
wrapped: true
items:
$ref: '#/components/schemas/Address'
xml:
name: customer
Address:
type: object
properties:
street:
type: string
example: 437 Lytton
city:
type: string
example: Palo Alto
state:
type: string
example: CA
zip:
type: string
example: '94301'
xml:
name: address
Category:
type: object
properties:
id:
type: integer
format: int64
example: 1
name:
type: string
example: Dogs
xml:
name: category
User:
type: object
properties:
id:
type: integer
format: int64
example: 10
username:
type: string
example: theUser
firstName:
type: string
example: John
lastName:
type: string
example: James
email:
type: string
example: john@email.com
password:
type: string
example: '12345'
phone:
type: string
example: '12345'
userStatus:
type: integer
description: User Status
format: int32
example: 1
xml:
name: user
Tag:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
xml:
name: tag
Pet:
required:
- name
- photoUrls
type: object
properties:
id:
type: integer
format: int64
example: 10
name:
type: string
example: doggie
category:
$ref: '#/components/schemas/Category'
photoUrls:
type: array
xml:
wrapped: true
items:
type: string
xml:
name: photoUrl
tags:
type: array
xml:
wrapped: true
items:
$ref: '#/components/schemas/Tag'
status:
type: string
description: pet status in the store
enum:
- available
- pending
- sold
xml:
name: pet
ApiResponse:
type: object
properties:
code:
type: integer
format: int32
type:
type: string
message:
type: string
xml:
name: '##default'
requestBodies:
Pet:
description: Pet object that needs to be added to the store
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
application/xml:
schema:
$ref: '#/components/schemas/Pet'
UserArray:
description: List of user object
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
securitySchemes:
petstore_auth:
type: oauth2
flows:
implicit:
authorizationUrl: https://petstore3.swagger.io/oauth/authorize
scopes:
write:pets: modify pets in your account
read:pets: read your pets
api_key:
type: apiKey
name: api_key
in: header

View File

@ -0,0 +1,88 @@
{
"openapi": "3.0.0",
"info": {
"title": "template",
"description": "This is a simple api with 4 methods",
"version": "1.0.0"
},
"servers": [
{
"url": "http://localhost:8181/cxf/template"
}
],
"paths": {
"/": {
"post": {
"operationId": "post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
},
"put": {
"operationId": "put",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
},
"get": {
"operationId": "get",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
},
"delete": {
"operationId": "delete",
"responses": {
"200": {
"description": "Success"
}
}
}
}
}
}

View File

@ -0,0 +1,51 @@
openapi: 3.0.0
info:
title: template
description: This is a simple api with 4 methods
version: 1.0.0
servers:
- url: http://localhost:8181/cxf/template
paths:
/:
post:
operationId: post
requestBody:
content:
application/json:
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: string
put:
operationId: put
requestBody:
content:
application/json:
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: string
get:
operationId: get
responses:
'200':
description: Success
content:
application/json:
schema:
type: string
delete:
operationId: delete
responses:
'200':
description: Success

View File

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="addPet">
<!-- path: /pet; verb: POST; operationId: addPet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/pet</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="updatePet">
<!-- path: /pet; verb: PUT; operationId: updatePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>PUT</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/pet</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="deleteUser">
<!-- path: /user/{username}; verb: DELETE; operationId: deleteUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>DELETE</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/user/${exchangeProperty.NTX_CLIENT_username}</simple>
</setHeader>
</m:operation>
<m:operation name="updateUser">
<!-- path: /user/{username}; verb: PUT; operationId: updateUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>PUT</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/user/${exchangeProperty.NTX_CLIENT_username}</simple>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="getUserByName">
<!-- path: /user/{username}; verb: GET; operationId: getUserByName-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/user/${exchangeProperty.NTX_CLIENT_username}</simple>
</setHeader>
</m:operation>
<m:operation name="findPetsByStatus">
<!-- path: /pet/findByStatus; verb: GET; operationId: findPetsByStatus-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/pet/findByStatus</constant>
</setHeader>
</m:operation>
<m:operation name="createUsersWithListInput">
<!-- path: /user/createWithList; verb: POST; operationId: createUsersWithListInput-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/user/createWithList</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="uploadFile">
<!-- path: /pet/{petId}/uploadImage; verb: POST; operationId: uploadFile-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/pet/${exchangeProperty.NTX_CLIENT_petId}/uploadImage</simple>
</setHeader>
<setHeader name="Content-Type">
<constant>application/octet-stream</constant>
</setHeader>
</m:operation>
<m:operation name="getInventory">
<!-- path: /store/inventory; verb: GET; operationId: getInventory-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/store/inventory</constant>
</setHeader>
</m:operation>
<m:operation name="loginUser">
<!-- path: /user/login; verb: GET; operationId: loginUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/user/login</constant>
</setHeader>
</m:operation>
<m:operation name="createUser">
<!-- path: /user; verb: POST; operationId: createUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/user</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="findPetsByTags">
<!-- path: /pet/findByTags; verb: GET; operationId: findPetsByTags-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/pet/findByTags</constant>
</setHeader>
</m:operation>
<m:operation name="placeOrder">
<!-- path: /store/order; verb: POST; operationId: placeOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/store/order</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="logoutUser">
<!-- path: /user/logout; verb: GET; operationId: logoutUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/user/logout</constant>
</setHeader>
</m:operation>
<m:operation name="deletePet">
<!-- path: /pet/{petId}; verb: DELETE; operationId: deletePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>DELETE</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/pet/${exchangeProperty.NTX_CLIENT_petId}</simple>
</setHeader>
</m:operation>
<m:operation name="updatePetWithForm">
<!-- path: /pet/{petId}; verb: POST; operationId: updatePetWithForm-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/pet/${exchangeProperty.NTX_CLIENT_petId}</simple>
</setHeader>
</m:operation>
<m:operation name="getPetById">
<!-- path: /pet/{petId}; verb: GET; operationId: getPetById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/pet/${exchangeProperty.NTX_CLIENT_petId}</simple>
</setHeader>
</m:operation>
<m:operation name="deleteOrder">
<!-- path: /store/order/{orderId}; verb: DELETE; operationId: deleteOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>DELETE</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/store/order/${exchangeProperty.NTX_CLIENT_orderId}</simple>
</setHeader>
</m:operation>
<m:operation name="getOrderById">
<!-- path: /store/order/{orderId}; verb: GET; operationId: getOrderById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/store/order/${exchangeProperty.NTX_CLIENT_orderId}</simple>
</setHeader>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,83 @@
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="addPet">
<!-- path: /pet; verb: POST; operationId: addPet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updatePet">
<!-- path: /pet; verb: PUT; operationId: updatePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deleteUser">
<!-- path: /user/{username}; verb: DELETE; operationId: deleteUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updateUser">
<!-- path: /user/{username}; verb: PUT; operationId: updateUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getUserByName">
<!-- path: /user/{username}; verb: GET; operationId: getUserByName-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="findPetsByStatus">
<!-- path: /pet/findByStatus; verb: GET; operationId: findPetsByStatus-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUsersWithListInput">
<!-- path: /user/createWithList; verb: POST; operationId: createUsersWithListInput-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="uploadFile">
<!-- path: /pet/{petId}/uploadImage; verb: POST; operationId: uploadFile-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getInventory">
<!-- path: /store/inventory; verb: GET; operationId: getInventory-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="loginUser">
<!-- path: /user/login; verb: GET; operationId: loginUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUser">
<!-- path: /user; verb: POST; operationId: createUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="findPetsByTags">
<!-- path: /pet/findByTags; verb: GET; operationId: findPetsByTags-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="placeOrder">
<!-- path: /store/order; verb: POST; operationId: placeOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="logoutUser">
<!-- path: /user/logout; verb: GET; operationId: logoutUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deletePet">
<!-- path: /pet/{petId}; verb: DELETE; operationId: deletePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updatePetWithForm">
<!-- path: /pet/{petId}; verb: POST; operationId: updatePetWithForm-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getPetById">
<!-- path: /pet/{petId}; verb: GET; operationId: getPetById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deleteOrder">
<!-- path: /store/order/{orderId}; verb: DELETE; operationId: deleteOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getOrderById">
<!-- path: /store/order/{orderId}; verb: GET; operationId: getOrderById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:set-operation>addPet</m:set-operation>
<m:operation-router>
<m:operation name="addPet">
<!-- path: /pet; verb: POST; operationId: addPet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updatePet">
<!-- path: /pet; verb: PUT; operationId: updatePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deleteUser">
<!-- path: /user/{username}; verb: DELETE; operationId: deleteUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_username">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="updateUser">
<!-- path: /user/{username}; verb: PUT; operationId: updateUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_username">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="getUserByName">
<!-- path: /user/{username}; verb: GET; operationId: getUserByName-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_username">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="findPetsByStatus">
<!-- path: /pet/findByStatus; verb: GET; operationId: findPetsByStatus-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUsersWithListInput">
<!-- path: /user/createWithList; verb: POST; operationId: createUsersWithListInput-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="uploadFile">
<!-- path: /pet/{petId}/uploadImage; verb: POST; operationId: uploadFile-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_petId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="getInventory">
<!-- path: /store/inventory; verb: GET; operationId: getInventory-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="loginUser">
<!-- path: /user/login; verb: GET; operationId: loginUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUser">
<!-- path: /user; verb: POST; operationId: createUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="findPetsByTags">
<!-- path: /pet/findByTags; verb: GET; operationId: findPetsByTags-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="placeOrder">
<!-- path: /store/order; verb: POST; operationId: placeOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="logoutUser">
<!-- path: /user/logout; verb: GET; operationId: logoutUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deletePet">
<!-- path: /pet/{petId}; verb: DELETE; operationId: deletePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_petId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="updatePetWithForm">
<!-- path: /pet/{petId}; verb: POST; operationId: updatePetWithForm-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_petId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="getPetById">
<!-- path: /pet/{petId}; verb: GET; operationId: getPetById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_petId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="deleteOrder">
<!-- path: /store/order/{orderId}; verb: DELETE; operationId: deleteOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_orderId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="getOrderById">
<!-- path: /store/order/{orderId}; verb: GET; operationId: getOrderById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_orderId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="addPet">
<!-- path: /pet; verb: POST; operationId: addPet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="updatePet">
<!-- path: /pet; verb: PUT; operationId: updatePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="deleteUser">
<!-- path: /user/{username}; verb: DELETE; operationId: deleteUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="updateUser">
<!-- path: /user/{username}; verb: PUT; operationId: updateUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="getUserByName">
<!-- path: /user/{username}; verb: GET; operationId: getUserByName-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="findPetsByStatus">
<!-- path: /pet/findByStatus; verb: GET; operationId: findPetsByStatus-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="createUsersWithListInput">
<!-- path: /user/createWithList; verb: POST; operationId: createUsersWithListInput-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="uploadFile">
<!-- path: /pet/{petId}/uploadImage; verb: POST; operationId: uploadFile-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="getInventory">
<!-- path: /store/inventory; verb: GET; operationId: getInventory-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="loginUser">
<!-- path: /user/login; verb: GET; operationId: loginUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="createUser">
<!-- path: /user; verb: POST; operationId: createUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="findPetsByTags">
<!-- path: /pet/findByTags; verb: GET; operationId: findPetsByTags-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="placeOrder">
<!-- path: /store/order; verb: POST; operationId: placeOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="logoutUser">
<!-- path: /user/logout; verb: GET; operationId: logoutUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="deletePet">
<!-- path: /pet/{petId}; verb: DELETE; operationId: deletePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="updatePetWithForm">
<!-- path: /pet/{petId}; verb: POST; operationId: updatePetWithForm-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="getPetById">
<!-- path: /pet/{petId}; verb: GET; operationId: getPetById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="deleteOrder">
<!-- path: /store/order/{orderId}; verb: DELETE; operationId: deleteOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="getOrderById">
<!-- path: /store/order/{orderId}; verb: GET; operationId: getOrderById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="addPet">
<!-- path: /pet; verb: POST; operationId: addPet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updatePet">
<!-- path: /pet; verb: PUT; operationId: updatePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deleteUser">
<!-- path: /user/{username}; verb: DELETE; operationId: deleteUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updateUser">
<!-- path: /user/{username}; verb: PUT; operationId: updateUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getUserByName">
<!-- path: /user/{username}; verb: GET; operationId: getUserByName-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="findPetsByStatus">
<!-- path: /pet/findByStatus; verb: GET; operationId: findPetsByStatus-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUsersWithListInput">
<!-- path: /user/createWithList; verb: POST; operationId: createUsersWithListInput-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="uploadFile">
<!-- path: /pet/{petId}/uploadImage; verb: POST; operationId: uploadFile-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getInventory">
<!-- path: /store/inventory; verb: GET; operationId: getInventory-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="loginUser">
<!-- path: /user/login; verb: GET; operationId: loginUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUser">
<!-- path: /user; verb: POST; operationId: createUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="findPetsByTags">
<!-- path: /pet/findByTags; verb: GET; operationId: findPetsByTags-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="placeOrder">
<!-- path: /store/order; verb: POST; operationId: placeOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="logoutUser">
<!-- path: /user/logout; verb: GET; operationId: logoutUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deletePet">
<!-- path: /pet/{petId}; verb: DELETE; operationId: deletePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updatePetWithForm">
<!-- path: /pet/{petId}; verb: POST; operationId: updatePetWithForm-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getPetById">
<!-- path: /pet/{petId}; verb: GET; operationId: getPetById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deleteOrder">
<!-- path: /store/order/{orderId}; verb: DELETE; operationId: deleteOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getOrderById">
<!-- path: /store/order/{orderId}; verb: GET; operationId: getOrderById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="addPet">
<!-- path: /pet; verb: POST; operationId: addPet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/pet</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="updatePet">
<!-- path: /pet; verb: PUT; operationId: updatePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>PUT</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/pet</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="deleteUser">
<!-- path: /user/{username}; verb: DELETE; operationId: deleteUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>DELETE</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/user/${exchangeProperty.NTX_CLIENT_username}</simple>
</setHeader>
</m:operation>
<m:operation name="updateUser">
<!-- path: /user/{username}; verb: PUT; operationId: updateUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>PUT</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/user/${exchangeProperty.NTX_CLIENT_username}</simple>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="getUserByName">
<!-- path: /user/{username}; verb: GET; operationId: getUserByName-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/user/${exchangeProperty.NTX_CLIENT_username}</simple>
</setHeader>
</m:operation>
<m:operation name="findPetsByStatus">
<!-- path: /pet/findByStatus; verb: GET; operationId: findPetsByStatus-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/pet/findByStatus</constant>
</setHeader>
</m:operation>
<m:operation name="createUsersWithListInput">
<!-- path: /user/createWithList; verb: POST; operationId: createUsersWithListInput-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/user/createWithList</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="uploadFile">
<!-- path: /pet/{petId}/uploadImage; verb: POST; operationId: uploadFile-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/pet/${exchangeProperty.NTX_CLIENT_petId}/uploadImage</simple>
</setHeader>
<setHeader name="Content-Type">
<constant>application/octet-stream</constant>
</setHeader>
</m:operation>
<m:operation name="getInventory">
<!-- path: /store/inventory; verb: GET; operationId: getInventory-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/store/inventory</constant>
</setHeader>
</m:operation>
<m:operation name="loginUser">
<!-- path: /user/login; verb: GET; operationId: loginUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/user/login</constant>
</setHeader>
</m:operation>
<m:operation name="createUser">
<!-- path: /user; verb: POST; operationId: createUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/user</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="findPetsByTags">
<!-- path: /pet/findByTags; verb: GET; operationId: findPetsByTags-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/pet/findByTags</constant>
</setHeader>
</m:operation>
<m:operation name="placeOrder">
<!-- path: /store/order; verb: POST; operationId: placeOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/store/order</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="logoutUser">
<!-- path: /user/logout; verb: GET; operationId: logoutUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/user/logout</constant>
</setHeader>
</m:operation>
<m:operation name="deletePet">
<!-- path: /pet/{petId}; verb: DELETE; operationId: deletePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>DELETE</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/pet/${exchangeProperty.NTX_CLIENT_petId}</simple>
</setHeader>
</m:operation>
<m:operation name="updatePetWithForm">
<!-- path: /pet/{petId}; verb: POST; operationId: updatePetWithForm-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/pet/${exchangeProperty.NTX_CLIENT_petId}</simple>
</setHeader>
</m:operation>
<m:operation name="getPetById">
<!-- path: /pet/{petId}; verb: GET; operationId: getPetById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/pet/${exchangeProperty.NTX_CLIENT_petId}</simple>
</setHeader>
</m:operation>
<m:operation name="deleteOrder">
<!-- path: /store/order/{orderId}; verb: DELETE; operationId: deleteOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>DELETE</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/store/order/${exchangeProperty.NTX_CLIENT_orderId}</simple>
</setHeader>
</m:operation>
<m:operation name="getOrderById">
<!-- path: /store/order/{orderId}; verb: GET; operationId: getOrderById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<simple>/store/order/${exchangeProperty.NTX_CLIENT_orderId}</simple>
</setHeader>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,83 @@
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="addPet">
<!-- path: /pet; verb: POST; operationId: addPet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updatePet">
<!-- path: /pet; verb: PUT; operationId: updatePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deleteUser">
<!-- path: /user/{username}; verb: DELETE; operationId: deleteUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updateUser">
<!-- path: /user/{username}; verb: PUT; operationId: updateUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getUserByName">
<!-- path: /user/{username}; verb: GET; operationId: getUserByName-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="findPetsByStatus">
<!-- path: /pet/findByStatus; verb: GET; operationId: findPetsByStatus-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUsersWithListInput">
<!-- path: /user/createWithList; verb: POST; operationId: createUsersWithListInput-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="uploadFile">
<!-- path: /pet/{petId}/uploadImage; verb: POST; operationId: uploadFile-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getInventory">
<!-- path: /store/inventory; verb: GET; operationId: getInventory-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="loginUser">
<!-- path: /user/login; verb: GET; operationId: loginUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUser">
<!-- path: /user; verb: POST; operationId: createUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="findPetsByTags">
<!-- path: /pet/findByTags; verb: GET; operationId: findPetsByTags-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="placeOrder">
<!-- path: /store/order; verb: POST; operationId: placeOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="logoutUser">
<!-- path: /user/logout; verb: GET; operationId: logoutUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deletePet">
<!-- path: /pet/{petId}; verb: DELETE; operationId: deletePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updatePetWithForm">
<!-- path: /pet/{petId}; verb: POST; operationId: updatePetWithForm-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getPetById">
<!-- path: /pet/{petId}; verb: GET; operationId: getPetById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deleteOrder">
<!-- path: /store/order/{orderId}; verb: DELETE; operationId: deleteOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getOrderById">
<!-- path: /store/order/{orderId}; verb: GET; operationId: getOrderById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:set-operation>addPet</m:set-operation>
<m:operation-router>
<m:operation name="addPet">
<!-- path: /pet; verb: POST; operationId: addPet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updatePet">
<!-- path: /pet; verb: PUT; operationId: updatePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deleteUser">
<!-- path: /user/{username}; verb: DELETE; operationId: deleteUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_username">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="updateUser">
<!-- path: /user/{username}; verb: PUT; operationId: updateUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_username">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="getUserByName">
<!-- path: /user/{username}; verb: GET; operationId: getUserByName-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_username">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="findPetsByStatus">
<!-- path: /pet/findByStatus; verb: GET; operationId: findPetsByStatus-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUsersWithListInput">
<!-- path: /user/createWithList; verb: POST; operationId: createUsersWithListInput-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="uploadFile">
<!-- path: /pet/{petId}/uploadImage; verb: POST; operationId: uploadFile-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_petId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="getInventory">
<!-- path: /store/inventory; verb: GET; operationId: getInventory-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="loginUser">
<!-- path: /user/login; verb: GET; operationId: loginUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUser">
<!-- path: /user; verb: POST; operationId: createUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="findPetsByTags">
<!-- path: /pet/findByTags; verb: GET; operationId: findPetsByTags-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="placeOrder">
<!-- path: /store/order; verb: POST; operationId: placeOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="logoutUser">
<!-- path: /user/logout; verb: GET; operationId: logoutUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deletePet">
<!-- path: /pet/{petId}; verb: DELETE; operationId: deletePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_petId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="updatePetWithForm">
<!-- path: /pet/{petId}; verb: POST; operationId: updatePetWithForm-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_petId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="getPetById">
<!-- path: /pet/{petId}; verb: GET; operationId: getPetById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_petId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="deleteOrder">
<!-- path: /store/order/{orderId}; verb: DELETE; operationId: deleteOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_orderId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:operation name="getOrderById">
<!-- path: /store/order/{orderId}; verb: GET; operationId: getOrderById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setProperty name="NTX_CLIENT_orderId">
<simple>undefined</simple>
</setProperty>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="addPet">
<!-- path: /pet; verb: POST; operationId: addPet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="updatePet">
<!-- path: /pet; verb: PUT; operationId: updatePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="deleteUser">
<!-- path: /user/{username}; verb: DELETE; operationId: deleteUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="updateUser">
<!-- path: /user/{username}; verb: PUT; operationId: updateUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="getUserByName">
<!-- path: /user/{username}; verb: GET; operationId: getUserByName-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="findPetsByStatus">
<!-- path: /pet/findByStatus; verb: GET; operationId: findPetsByStatus-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="createUsersWithListInput">
<!-- path: /user/createWithList; verb: POST; operationId: createUsersWithListInput-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="uploadFile">
<!-- path: /pet/{petId}/uploadImage; verb: POST; operationId: uploadFile-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="getInventory">
<!-- path: /store/inventory; verb: GET; operationId: getInventory-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="loginUser">
<!-- path: /user/login; verb: GET; operationId: loginUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="createUser">
<!-- path: /user; verb: POST; operationId: createUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="findPetsByTags">
<!-- path: /pet/findByTags; verb: GET; operationId: findPetsByTags-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="placeOrder">
<!-- path: /store/order; verb: POST; operationId: placeOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="logoutUser">
<!-- path: /user/logout; verb: GET; operationId: logoutUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="deletePet">
<!-- path: /pet/{petId}; verb: DELETE; operationId: deletePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="updatePetWithForm">
<!-- path: /pet/{petId}; verb: POST; operationId: updatePetWithForm-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="getPetById">
<!-- path: /pet/{petId}; verb: GET; operationId: getPetById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="deleteOrder">
<!-- path: /store/order/{orderId}; verb: DELETE; operationId: deleteOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="getOrderById">
<!-- path: /store/order/{orderId}; verb: GET; operationId: getOrderById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="addPet">
<!-- path: /pet; verb: POST; operationId: addPet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updatePet">
<!-- path: /pet; verb: PUT; operationId: updatePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deleteUser">
<!-- path: /user/{username}; verb: DELETE; operationId: deleteUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updateUser">
<!-- path: /user/{username}; verb: PUT; operationId: updateUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getUserByName">
<!-- path: /user/{username}; verb: GET; operationId: getUserByName-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="findPetsByStatus">
<!-- path: /pet/findByStatus; verb: GET; operationId: findPetsByStatus-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUsersWithListInput">
<!-- path: /user/createWithList; verb: POST; operationId: createUsersWithListInput-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="uploadFile">
<!-- path: /pet/{petId}/uploadImage; verb: POST; operationId: uploadFile-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getInventory">
<!-- path: /store/inventory; verb: GET; operationId: getInventory-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="loginUser">
<!-- path: /user/login; verb: GET; operationId: loginUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="createUser">
<!-- path: /user; verb: POST; operationId: createUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="findPetsByTags">
<!-- path: /pet/findByTags; verb: GET; operationId: findPetsByTags-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="placeOrder">
<!-- path: /store/order; verb: POST; operationId: placeOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="logoutUser">
<!-- path: /user/logout; verb: GET; operationId: logoutUser-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deletePet">
<!-- path: /pet/{petId}; verb: DELETE; operationId: deletePet-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="updatePetWithForm">
<!-- path: /pet/{petId}; verb: POST; operationId: updatePetWithForm-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getPetById">
<!-- path: /pet/{petId}; verb: GET; operationId: getPetById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="deleteOrder">
<!-- path: /store/order/{orderId}; verb: DELETE; operationId: deleteOrder-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="getOrderById">
<!-- path: /store/order/{orderId}; verb: GET; operationId: getOrderById-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="delete">
<!-- path: /; verb: DELETE; operationId: delete-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>DELETE</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/</constant>
</setHeader>
</m:operation>
<m:operation name="post">
<!-- path: /; verb: POST; operationId: post-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="put">
<!-- path: /; verb: PUT; operationId: put-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>PUT</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="get">
<!-- path: /; verb: GET; operationId: get-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/</constant>
</setHeader>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,23 @@
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="delete">
<!-- path: /; verb: DELETE; operationId: delete-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="post">
<!-- path: /; verb: POST; operationId: post-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="put">
<!-- path: /; verb: PUT; operationId: put-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="get">
<!-- path: /; verb: GET; operationId: get-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:set-operation>delete</m:set-operation>
<m:operation-router>
<m:operation name="delete">
<!-- path: /; verb: DELETE; operationId: delete-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="post">
<!-- path: /; verb: POST; operationId: post-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="put">
<!-- path: /; verb: PUT; operationId: put-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="get">
<!-- path: /; verb: GET; operationId: get-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="delete">
<!-- path: /; verb: DELETE; operationId: delete-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="post">
<!-- path: /; verb: POST; operationId: post-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="put">
<!-- path: /; verb: PUT; operationId: put-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="get">
<!-- path: /; verb: GET; operationId: get-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="delete">
<!-- path: /; verb: DELETE; operationId: delete-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="post">
<!-- path: /; verb: POST; operationId: post-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="put">
<!-- path: /; verb: PUT; operationId: put-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="get">
<!-- path: /; verb: GET; operationId: get-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="delete">
<!-- path: /; verb: DELETE; operationId: delete-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>DELETE</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/</constant>
</setHeader>
</m:operation>
<m:operation name="post">
<!-- path: /; verb: POST; operationId: post-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>POST</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="put">
<!-- path: /; verb: PUT; operationId: put-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>PUT</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>
</m:operation>
<m:operation name="get">
<!-- path: /; verb: GET; operationId: get-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>GET</constant>
</setHeader>
<setHeader name="Exchange.HTTP_PATH">
<constant>/</constant>
</setHeader>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,23 @@
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="delete">
<!-- path: /; verb: DELETE; operationId: delete-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="post">
<!-- path: /; verb: POST; operationId: post-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="put">
<!-- path: /; verb: PUT; operationId: put-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="get">
<!-- path: /; verb: GET; operationId: get-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:set-operation>delete</m:set-operation>
<m:operation-router>
<m:operation name="delete">
<!-- path: /; verb: DELETE; operationId: delete-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="post">
<!-- path: /; verb: POST; operationId: post-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="put">
<!-- path: /; verb: PUT; operationId: put-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="get">
<!-- path: /; verb: GET; operationId: get-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="delete">
<!-- path: /; verb: DELETE; operationId: delete-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="post">
<!-- path: /; verb: POST; operationId: post-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="put">
<!-- path: /; verb: PUT; operationId: put-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:operation name="get">
<!-- path: /; verb: GET; operationId: get-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
<m:operation name="delete">
<!-- path: /; verb: DELETE; operationId: delete-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="post">
<!-- path: /; verb: POST; operationId: post-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="put">
<!-- path: /; verb: PUT; operationId: put-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:operation name="get">
<!-- path: /; verb: GET; operationId: get-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,17 @@
[#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"
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]
<camelContext id="[=objectId]" xmlns="http://camel.apache.org/schema/blueprint">
<route id="[=objectId].output-route">
<from uri="direct:entry-cascade-finish" />
<to uri="direct-vm:call-[=properties.serviceId]-service[=utils.createQueryString(properties, "camel_", true)]" />
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,17 @@
[#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"
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]
<camelContext id="[=objectId]" xmlns="http://camel.apache.org/schema/blueprint">
<route id="[=objectId].output-route">
<from uri="direct:entry-cascade-finish" />
<to uri="direct-vm:call-[=properties.serviceId]-service[=utils.createQueryString(properties, "camel_", true)]" />
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,82 @@
[#ftl attributes={"generated.type":"factory"}]
{
"factory": {
"id": "[=properties.serviceId]-rest-connector-out",
"displayName": "SERVICE :: REST :: [=properties.serviceId] :: OUT",
"type": "entaxy.runtime.connector",
"description": "OUT connector for client of REST service [=properties.serviceId]",
"parent": "abstract-service-rest-connector-out",
"isAbstract": false
},
"entaxy.runtime.connector": {},
"fields": {
"serviceId": {
"type": "String",
"required": true,
"isHidden": true,
"defaultValue": "[=properties.serviceId]"
},
"##publish": {
"type": "Map",
"required": true,
"isHidden": true,
"defaultValue":{
"@INHERIT": {
"relation": "append"
},
"relation": [
"[=properties.serviceId]:[=properties.serviceObjectType]:connector:dependency:bounds"
]
}
},
"pre-output": {
"@RESOURCE": {
"__@INHERIT": {
"preprocess": "append"
},
"__preprocess":[
{
"processor": "xslt",
"source":"entaxy-file-internal:routes-common/rest-operation-router.xslt",
"parameters": {
"profileName": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.systemName}",
"lazy": false
}
}
}
}
],
"postprocess": [
{
"processor": "component-library",
"parameters": {
"serviceType": "[=properties.serviceType]"
}
}
]
},
"defaultValue": {
"@RESOURCE": {
"provider": "service-resources",
"location": "[=properties.location]",
"endType": "String",
"format": "base64"
}
}
}
},
"outputs": {
"init": {
"isDefault": true,
"fields": {
"serviceId": {}
},
"config": {
"configurable": false
}
}
}
}

View File

@ -0,0 +1,16 @@
[#if properties.camel_headerFilterStrategy??]
[#if properties.camel_headerFilterStrategy == "custom"]
[#assign headerFilterStrategyReference = properties.headerFilterStrategyReference]
[#else]
[#assign headerFilterStrategyReference = "headerFilterStrategy"]
[/#if]
[#global properties = properties + {"camel_headerFilterStrategy": "#[=headerFilterStrategyReference]"} ]
[/#if]
[#if properties.camel_sslContextParameters??]
[#if properties.camel_sslContextParameters == "custom"]
[#assign sslContextParametersReference = properties.sslContextParametersReference]
[#else]
[#assign sslContextParametersReference = "sslContextParameters"]
[/#if]
[#global properties = properties + {"camel_sslContextParameters": "#[=sslContextParametersReference]"} ]
[/#if]

View File

@ -0,0 +1,143 @@
[#ftl attributes={"generated.type":"blueprint"}]
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf"
xmlns:cxf="http://cxf.apache.org/blueprint/core"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
">
[#import "templates:object-commons/common-utils.ftl" as utils]
[#include "customObjectReferences.ftl" ]
<!--
INFO:
factoryId: openapi-based-rest-service-public
factoryType: entaxy.runtime.service
outputType: init
properties:
[#list properties?keys as key]
[=key]
[/#list]
-->
[#assign finalAddress=properties.address]
[#if !finalAddress?starts_with('http://') && !finalAddress?starts_with('https://')]
[#if !finalAddress?starts_with('/')]
[#assign finalAddress='/'+properties.address]
[/#if]
[/#if]
[#if properties._serviceMetadata.classes.apis??]
[#-- --list 0..properties._serviceMetadata.classes.apis?size-1 as i [/#list]--]
[#assign apis = properties._serviceMetadata.classes.apis?join(",")]
[/#if]
<!--
apis: [=apis]
path: service-resources:[=properties._serviceMetadata.serviceResourcesRoot]/[=properties._serviceMetadata.classes.folder]/
-->
<bean id="class-resolver-[=objectId]" activation="eager" class="ru.entaxy.platform.core.support.runtime.cxf.EntaxyClassResolver">
<argument ref="blueprintBundleContext"/>
<argument ref="[=camelContextId!]"/>
<argument>
<list value-type="java.lang.String">
<value>service-resources:[=properties._serviceMetadata.serviceResourcesRoot]/[=properties._serviceMetadata.classes.folder]/</value>
</list>
</argument>
</bean>
<camelcxf:rsClient id="client-[=objectId]"
serviceClass="org.apache.cxf.jaxrs.client.WebClient"
address="[=finalAddress]"
[#if properties.authUsername??]
username="[=authUsername]"
[/#if]
[#if properties.authPassword??]
password="[=authPassword]"
[/#if]
>
<camelcxf:properties>
<entry key="http.receive.timeout" value="60"/>
</camelcxf:properties>
<!--
<camelcxf:providers>
<ref component-id="jsonProvider"/>
</camelcxf:providers>
-->
<camelcxf:features>
<ref component-id="openApiFeature"/>
</camelcxf:features>
</camelcxf:rsClient>
<!-- JAXRS providers
<bean id="jsonProviderFactory" class="ru.entaxy.platform.core.support.runtime.jackson.JacksonJsonProviderFactory">
<property name="addJodaModule" value="true"/>
<property name="acceptSingleValueAsArray" value="true"/>
<property name="failOnUnknownProperties" value="false"/>
</bean>
<bean id="jsonProvider" factory-ref="jsonProviderFactory" factory-method="create"/>
-->
<!-- CXF OpenApiFeature -->
<bean id="openApiFeature" class="org.apache.cxf.jaxrs.openapi.OpenApiFeature">
<property name="runAsFilter" value="true" />
<property name="useContextBasedConfig" value="true" />
<property name="scan" value="true" />
</bean>
<camelContext id="[=properties.camelContextId!]" xmlns="http://camel.apache.org/schema/blueprint">
<route id="error_from_cxf">
<from uri="direct:error_from_cxf"/>
<log message="cxf message: ${body}" loggingLevel="DEBUG"/>
<log message="headers: ${headers}\n" loggingLevel="DEBUG"/>
<to uri="direct-vm:cxfErrorEndpoint"/>
</route>
<route id="[=objectId]-cxf-endpoint" streamCache="true">
<from uri="direct-vm:call-[=objectId]-service" />
[#if properties.oauthEnable?? && properties.oauthEnable?boolean == true]
<to uri="direct:oauth-prepare" />
[/#if]
<to uri="direct:[=objectId]-operation-router" />
<removeProperties pattern="NTX_CLIENT_*"/>
[#if properties.oauthRefreshPolicy?? && properties.oauthRefreshPolicy == "error"
&& properties.oauthErrorCode?? && properties.oauthErrorCode != ""]
[#global properties = properties + {"camel_throwExceptionOnFailure": "false"} ]
<setProperty name="NTX_bodyHolder">
<simple>${body}</simple>
</setProperty>
[/#if]
[#global properties = properties + {"camel_resourceClasses": "[=apis]"} ]
<to uri="cxfrs:bean:client-[=objectId][=utils.createQueryString(properties, "camel_", true, ["fieldToExclude1","fieldToExclude2"])]"/>
<log loggingLevel="TRACE" message="headers\n ${headers}"/>
<log loggingLevel="TRACE" message="properties\n ${exchange.getProperties()}"/>
[#if properties.oauthRefreshPolicy?? && properties.oauthRefreshPolicy == "error"
&& properties.oauthErrorCode?? && properties.oauthErrorCode != ""]
<to uri="direct:oauth-refresh-error" />
<choice>
<when>
<simple>${exchangeProperty.oauthRefreshed}</simple>
<setBody>
<simple>${exchangeProperty.NTX_bodyHolder}</simple>
</setBody>
[#global properties = properties + {"camel_throwExceptionOnFailure": "true"} ]
<to uri="cxfrs:bean:client-[=objectId][=utils.createQueryString(properties, "camel_", true, ["fieldToExclude1","fieldToExclude2"])]"/>
</when>
<when>
<simple>${header.CamelHttpResponseCode} &gt; 207</simple>
<throwException message="Call operation failed invoking ${exchangeProperty.CamelToEndpoint} with statusCode: ${header.CamelHttpResponseCode}" exceptionType="java.io.IOException"/>
</when>
</choice>
[/#if]
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,15 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<bean id="[=serviceId]-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="connectorList"
interface="ru.entaxy.platform.services.runtime.EntaxyServiceConnectorInfo"
filter="(service=[=serviceId])" availability="optional">
<reference-listener ref="[=serviceId]-connector-registry"
bind-method="register" unbind-method="unregister"/>
</reference-list>

View File

@ -19,6 +19,11 @@
[#list properties?keys as key]
[=key]
[/#list]
_serviceMetadata:
[#list properties._serviceMetadata?keys as key]
[=key]
[/#list]
-->
[#if properties.authorizationType != "NONE" && properties.displayServiceSchema]
@ -63,11 +68,12 @@
</bean>
[#if properties.restrictByRoles]
<bean id="authorizationInterceptor" class="org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor">
<!-- its possible to define global roles that apply to all WSDL operations not listed above -->
<bean id="authorizationInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.jwt.SimpleAuthorizingFromTokenInterceptor">
<property name="globalRoles" value="[=properties.globalRoles]"/>
</bean>
[/#if]
<bean id="resolveProfileNameFromTokenInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.jwt.ResolveProfileNameFromTokenInterceptor">
</bean>
[/#if]
[#if properties.authorizationType == "OAUTH INTROSPECT"]
@ -94,7 +100,7 @@
</bean>
<bean id="rsClient"
class="ru.entaxy.platform.core.support.runtime.cxf.EntaxyWebClient" factory-ref="tokenServiceClient"
class="org.apache.cxf.jaxrs.client.WebClient" factory-ref="tokenServiceClient"
factory-method="create" />
<bean id="tokenValidator" class="org.apache.cxf.rs.security.oauth2.filters.AccessTokenIntrospectionClient">
@ -105,6 +111,15 @@
<property name="tokenValidator" ref="tokenValidator"/>
<property name="audienceIsEndpointAddress" value="[=properties.audienceIsEndpointAddress]"/>
</bean>
<bean id="resolveProfileNameFromTokenInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.jwt.ResolveProfileNameFromTokenInterceptor">
</bean>
[#if properties.restrictByRoles]
<bean id="authorizationInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.jwt.SimpleAuthorizingFromTokenInterceptor">
<property name="globalRoles" value="[=properties.globalRoles]"/>
</bean>
[/#if]
[/#if]
@ -149,6 +164,22 @@
<property name="bundleContext" ref="blueprintBundleContext"></property>
</bean>
[#if properties.isValidate?? && properties.isValidate]
<bean id="validationInInterceptor"
class="org.apache.cxf.jaxrs.validation.JAXRSBeanValidationInInterceptor">
<property name="provider" ref="beanValidationProvider" />
[#if properties._serviceMetadata.classes.apis??]
<property name="serviceObject" ref="proxy-bean-[=objectId]-0" />
[/#if]
</bean>
<bean id="beanValidationProvider" class="org.apache.cxf.validation.BeanValidationProvider">
<argument ref="validationProviderResolver"/>
</bean>
<bean id="validationProviderResolver" class="ru.entaxy.platform.services.runtime.resolver.HibernateValidationProviderResolver"/>
[/#if]
[#assign finalAddress=properties.address]
[#if !finalAddress?starts_with('http://') && !finalAddress?starts_with('https://')]
[#if !finalAddress?starts_with('/')]
@ -186,17 +217,23 @@
[#else]
<!-- default behavior -->
[/#if]
[#if properties.authorizationType == "JAAS"]
<ref component-id="jaasLoginInterceptor" />
[#if properties.restrictByRoles]
<ref component-id="simpleAuthorizingInterceptor" />
[#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]
<ref component-id="resolveProfileNameInterceptor" />
<ref component-id="resolveLoginInterceptor"/>
[/#if]
[#if properties.authorizationType == "OAUTH STAND ALONE" && properties.restrictByRoles]
[#if properties.authorizationType == "OAUTH STAND ALONE" && properties.restrictByRoles]
<ref component-id="authorizationInterceptor"/>
[/#if]
[/#if]
[#if properties.authorizationType == "OAUTH INTROSPECT" || properties.authorizationType == "OAUTH STAND ALONE"]
<ref component-id="resolveProfileNameFromTokenInterceptor" />
[/#if]
[#if properties.isValidate?? && properties.isValidate]
<ref component-id="validationInInterceptor" />
[/#if]
</camelcxf:inInterceptors>
[#if properties.jwtKeystore??]
<camelcxf:properties>
@ -219,9 +256,6 @@
<constant>application/json</constant>
</setHeader>
[#if properties.isValidate?? && properties.isValidate]
<to uri="bean-validator:validation"/>
[/#if]
[#if properties.resultType?? && properties.resultType == "ORIGIN"]
<marshal>
<json library="Jackson" autoDiscoverObjectMapper="true"/>

View File

@ -0,0 +1,19 @@
[#ftl attributes={"generated.type":"blueprint"}]
[#if properties.generateLoggingKey?? && properties.generateLoggingKey]
<setProperty name="service">
<constant>[=properties.displayName]</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"/>
[/#if]

View File

@ -0,0 +1,38 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
[#if properties.service??]
[#if properties.service.operations??]
[#list properties.service.operations as path, operationData]
[#list operationData as verb, operation]
<m:operation name="[=operation.operationIdCamelCase]">
<!-- path: [=path]; verb: [=verb]; operationId: [=operation.original!"isn't set"]-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<setHeader name="Exchange.HTTP_METHOD">
<constant>[=verb]</constant>
</setHeader>
[#if operation.pathParameterized?? && operation.pathParameterized?boolean == true]
<setHeader name="Exchange.HTTP_PATH">
<simple>[=operation.pathProcessed]</simple>
</setHeader>
[#else]
<setHeader name="Exchange.HTTP_PATH">
<constant>[=path]</constant>
</setHeader>
[/#if]
[#if operation.contentType??]
<setHeader name="Content-Type">
<constant>[=operation.contentType]</constant>
</setHeader>
[/#if]
</m:operation>
[/#list]
[/#list]
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
[/#if]
[/#if]
</m:operation-router>
</entaxy:object-route>

View File

@ -0,0 +1,21 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<route>
<from uri="direct:pre-route" />
<operation-router>
[#if properties.service??]
[#if properties.service.operations??]
[#list properties.service.operations as path, operationData]
[#list operationData as verb, operation]
<operation name="[=operation.operationIdCamelCase]">
<!-- path: [=path]; verb: [=verb]; operationId: [=operation.original!"isn't set"]-->
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</operation>
[/#list]
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>

View File

@ -0,0 +1,30 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
[#if properties.service??]
[#if properties.service.operations?? && properties.service.operations?size > 0]
<m:set-operation>[=properties.service.operations?values[0]?values[0].operationIdCamelCase]</m:set-operation>
<m:operation-router>
[#list properties.service.operations as path, operationData]
[#list operationData as verb, operation]
<m:operation name="[=operation.operationIdCamelCase]">
<!-- path: [=path]; verb: [=verb]; operationId: [=operation.original!"isn't set"]-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
[#if operation.pathParameterized?? && operation.pathParameterized?boolean == true
&& operation.pathParameters??]
[#list operation.pathParameters as parameter]
<setProperty name="[=parameter]">
<simple>undefined</simple>
</setProperty>
[/#list]
[/#if]
</m:operation>
[/#list]
[/#list]
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
[/#if]
[/#if]
</entaxy:object-route>

View File

@ -0,0 +1,23 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<?xml version="1.0" encoding="UTF-8"?>
<route>
<operation-router-start />
<operation-router>
[#if properties.service??]
[#if properties.service.operations??]
[#list properties.service.operations as path, operationData]
[#list operationData as verb, operation]
<operation name="[=operation.operationIdCamelCase]">
<!-- path: [=path]; verb: [=verb]; operationId: [=operation.original!"isn't set"]-->
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<connector direction="in" />
</operation>
[/#list]
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>

View File

@ -0,0 +1,22 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<?xml version="1.0" encoding="UTF-8"?>
<route>
<operation-router-start />
<operation-router>
[#if properties.service??]
[#if properties.service.operations??]
[#list properties.service.operations as path, operationData]
[#list operationData as verb, operation]
<operation name="[=operation.operationIdCamelCase]">
<!-- path: [=path]; verb: [=verb]; operationId: [=operation.original!"isn't set"]-->
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</operation>
[/#list]
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>

View File

@ -0,0 +1,10 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<!--
factoryId: service-resources-soap
factoryType: entaxy.runtime.service.support
outputType: operationRouterClient
-->

View File

@ -0,0 +1,18 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<route>
<from uri="direct:pre-route" />
<operation-router>
[#if properties.service??]
[#if properties.service.port??]
[#list properties.service.port.operations as operation]
<operation name="[=operation]">
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</operation>
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>

View File

@ -0,0 +1,18 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
[#if properties.service??]
[#if properties.service.port??]
<m:set-operation>[=properties.service.port.operations?first]</m:set-operation>
<m:operation-router>
[#list properties.service.port.operations as operation]
<m:operation name="[=operation]">
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
[/#list]
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
</m:operation-router>
[/#if]
[/#if]
</entaxy:object-route>

View File

@ -0,0 +1,20 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<?xml version="1.0" encoding="UTF-8"?>
<route>
<operation-router-start />
<operation-router>
[#if properties.service??]
[#if properties.service.port??]
[#list properties.service.port.operations as operation]
<operation name="[=operation]">
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<connector direction="in" />
</operation>
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>

View File

@ -0,0 +1,19 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<?xml version="1.0" encoding="UTF-8"?>
<route>
<operation-router-start />
<operation-router>
[#if properties.service??]
[#if properties.service.port??]
[#list properties.service.port.operations as operation]
<operation name="[=operation]">
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</operation>
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>

View File

@ -0,0 +1,70 @@
[#ftl attributes={"generated.type":"factory"}]
{
"factory": {
"id": "[=properties.serviceId]-soap-connector-out",
"displayName": "SERVICE :: SOAP :: [=properties.serviceId] :: OUT",
"type": "entaxy.runtime.connector",
"description": "Factory abstract-service-soap-connector-out of entaxy.runtime.connector",
"parent": "abstract-service-soap-connector-out",
"isAbstract": false
},
"entaxy.runtime.connector": {},
"fields": {
"serviceId": {
"type": "String",
"required": true,
"isHidden": true,
"defaultValue": "[=properties.serviceId]"
},
"pre-output": {
"@RESOURCE": {
"@INHERIT": {
"preprocess": "append"
},
"_preprocess":[
{
"processor": "xslt",
"source":"entaxy-file-internal:routes-common/soap-operation-router.xslt",
"parameters": {
"profileName": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.systemName}",
"lazy": false
}
}
}
}
],
"postprocess": [
{
"processor": "component-library",
"parameters": {
"serviceType": "[=properties.serviceType]"
}
}
]
},
"defaultValue": {
"@RESOURCE": {
"provider": "service-resources",
"location": "[=properties.location]",
"endType": "String",
"format": "base64"
}
}
}
},
"outputs": {
"init": {
"isDefault": true,
"fields": {
"serviceId": {}
},
"config": {
"configurable": false
}
}
}
}

View File

@ -0,0 +1,16 @@
[#if properties.camel_headerFilterStrategy??]
[#if properties.camel_headerFilterStrategy == "custom"]
[#assign headerFilterStrategyReference = properties.headerFilterStrategyReference]
[#else]
[#assign headerFilterStrategyReference = "headerFilterStrategy"]
[/#if]
[#global properties = properties + {"camel_headerFilterStrategy": "#[=headerFilterStrategyReference]"} ]
[/#if]
[#if properties.camel_sslContextParameters??]
[#if properties.camel_sslContextParameters == "custom"]
[#assign sslContextParametersReference = properties.sslContextParametersReference]
[#else]
[#assign sslContextParametersReference = "sslContextParameters"]
[/#if]
[#global properties = properties + {"camel_sslContextParameters": "#[=sslContextParametersReference]"} ]
[/#if]

View File

@ -0,0 +1,67 @@
[#ftl attributes={"generated.type":"blueprint"}]
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
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
http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
">
[#import "templates:object-commons/common-utils.ftl" as utils]
[#include "customObjectReferences.ftl" ]
<!-- 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]
-->
[#if schemaValidationEnabled?? && schemaValidationEnabled?is_boolean]
[#assign schemaValidationEnabled = schemaValidationEnabled?then("BOTH","NONE")]
[/#if]
<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!"NONE"]"/>
[#if properties.authUsername?? && properties.authPassword??]
<entry key="username" value="[=properties.authUsername]"/>
<entry key="password" value="[=properties.authPassword]"/>
[/#if]
</camelcxf:properties>
</camelcxf:cxfEndpoint>
<camelContext id="soap-client-[=objectId]-context" xmlns="http://camel.apache.org/schema/blueprint"
errorHandlerRef="commonErrorHandler">
<route id="error_from_cxf">
<from uri="direct:error_from_cxf"/>
<log message="cxf message: ${body}" loggingLevel="DEBUG"/>
<log message="headers: ${headers}\n" loggingLevel="DEBUG"/>
<to uri="direct-vm:cxfErrorEndpoint"/>
</route>
<route id="[=objectId]-cxf-endpoint" streamCache="true">
<from uri="direct-vm:call-[=objectId]-service" />
<!-- <setHeader name="ENTAXY_EndpointName">
<simple>[=objectId]</simple>
</setHeader> -->
<to uri="direct:[=objectId]-operation-router" />
<to uri="cxf:bean:[=objectId]-cxf-endpoint[=utils.createQueryString(properties, "camel_", true, ["fieldToExclude1","fieldToExclude2"])]"/>
</route>
</camelContext>
</blueprint>

View File

@ -27,6 +27,9 @@
[#assign finalAddress='/'+properties.address]
[/#if]
[/#if]
[#if schemaValidationEnabled?? && schemaValidationEnabled?is_boolean]
[#assign schemaValidationEnabled = schemaValidationEnabled?then("BOTH","NONE")]
[/#if]
<camelcxf:cxfEndpoint id="[=objectId]-cxf-endpoint"
address="[=finalAddress]"
@ -36,7 +39,7 @@
<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]"/>
<entry key="schema-validation-enabled" value="[=properties.schemaValidationEnabled!"NONE"]"/>
</camelcxf:properties>
<camelcxf:inInterceptors>
[#if properties.authorizationType == "JAAS"]
@ -69,7 +72,7 @@
</bean>
<bean id="validator" class="ru.entaxy.platform.services.runtime.interceptor.SOAPValidateInterceptor">
<property name="schemaValidationEnabled" value="[=properties.schemaValidationEnabled?c]"/>
<property name="schemaValidationEnabled" value="[=(schemaValidationEnabled?? && schemaValidationEnabled=="BOTH")?c]"/>
</bean>
[#if properties.authorizationType == "JAAS"]
<bean id="jaasLoginInterceptor" class="org.apache.cxf.interceptor.security.JAASLoginInterceptor">

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>service-implementation</artifactId>
<version>1.10.0</version>
<version>1.11.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.service-implementation</groupId>
<artifactId>service-runtime</artifactId>
@ -14,9 +14,11 @@
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.platform.services.runtime,
ru.entaxy.platform.services.runtime.resolver,
ru.entaxy.platform.services.runtime.exceptions,
ru.entaxy.platform.services.runtime.impl,
ru.entaxy.platform.services.runtime.interceptor,
ru.entaxy.platform.services.runtime.interceptor.jwt,
ru.entaxy.platform.services.runtime.utils
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
@ -82,6 +84,11 @@
<artifactId>org.apache.karaf.jaas.boot</artifactId>
<version>${karaf.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.1.5.Final</version>
</dependency>
</dependencies>
</project>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* system-commons
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -0,0 +1,63 @@
/*-
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2025 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~~~~~~
*/
/**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package ru.entaxy.platform.services.runtime.interceptor;
import org.apache.cxf.frontend.WSDLGetInterceptor;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
public class DisableWSDLGetInterceptor extends AbstractPhaseInterceptor<Message> {
public static final DisableWSDLGetInterceptor INSTANCE = new DisableWSDLGetInterceptor();
public static final String DOCUMENT_HOLDER = DisableWSDLGetInterceptor.class.getName() + ".documentHolder";
public DisableWSDLGetInterceptor() {
super(Phase.READ);
getBefore().remove(WSDLGetInterceptor.class.getName());
getAfter().remove(WSDLGetInterceptor.class.getName());
}
public void handleMessage(Message message) throws Fault {
message.getInterceptorChain().remove(WSDLGetInterceptor.INSTANCE);
return;
}
}

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -0,0 +1,162 @@
/*-
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2025 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~~~~~~
*/
/**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package ru.entaxy.platform.services.runtime.interceptor;
import java.util.Iterator;
import java.util.Map;
import org.apache.cxf.binding.soap.interceptor.EndpointSelectionInterceptor;
import org.apache.cxf.common.util.StringUtils;
import org.apache.cxf.common.util.UrlUtils;
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.frontend.WSDLGetInterceptor;
import org.apache.cxf.frontend.WSDLGetOutInterceptor;
import org.apache.cxf.frontend.WSDLGetUtils;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.interceptor.Interceptor;
import org.apache.cxf.interceptor.MessageSenderInterceptor;
import org.apache.cxf.interceptor.OutgoingChainInterceptor;
import org.apache.cxf.interceptor.StaxOutInterceptor;
import org.apache.cxf.message.Message;
import org.apache.cxf.message.MessageImpl;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.transport.common.gzip.GZIPOutInterceptor;
import org.w3c.dom.Document;
public class PostAuthWSDLGetInterceptor extends AbstractPhaseInterceptor<Message> {
public static final PostAuthWSDLGetInterceptor INSTANCE = new PostAuthWSDLGetInterceptor();
public static final String DOCUMENT_HOLDER = WSDLGetInterceptor.class.getName() + ".documentHolder";
private static final String TRANSFORM_SKIP = "transform.skip";
private Interceptor<Message> wsdlGetOutInterceptor = WSDLGetOutInterceptor.INSTANCE;
public PostAuthWSDLGetInterceptor() {
super(Phase.UNMARSHAL);
getBefore().remove(WSDLGetInterceptor.class.getName());
getAfter().add(EndpointSelectionInterceptor.class.getName());
}
public PostAuthWSDLGetInterceptor(Interceptor<Message> outInterceptor) {
this();
// Let people override the wsdlGetOutInterceptor
wsdlGetOutInterceptor = outInterceptor;
}
public void handleMessage(Message message) throws Fault {
String method = (String) message.get(Message.HTTP_REQUEST_METHOD);
String query = (String) message.get(Message.QUERY_STRING);
if (!"GET".equals(method) || StringUtils.isEmpty(query)) {
return;
}
String baseUri = (String) message.get(Message.REQUEST_URL);
String ctx = (String) message.get(Message.PATH_INFO);
WSDLGetUtils utils = (WSDLGetUtils) message.getContextualProperty(WSDLGetUtils.class.getName());
if (utils == null) {
utils = new WSDLGetUtils();
message.put(WSDLGetUtils.class, utils);
}
Map<String, String> map = UrlUtils.parseQueryString(query);
if (isRecognizedQuery(map)) {
Document doc = getDocument(utils, message, baseUri, map, ctx);
Endpoint e = message.getExchange().getEndpoint();
Message mout = new MessageImpl();
mout.setExchange(message.getExchange());
mout = e.getBinding().createMessage(mout);
mout.setInterceptorChain(OutgoingChainInterceptor.getOutInterceptorChain(message.getExchange()));
message.getExchange().setOutMessage(mout);
mout.put(DOCUMENT_HOLDER, doc);
mout.put(Message.CONTENT_TYPE, "text/xml");
// just remove the interceptor which should not be used
cleanUpOutInterceptors(mout);
// notice this is being added after the purge above, don't swap the order!
mout.getInterceptorChain().add(wsdlGetOutInterceptor);
message.getExchange().put(TRANSFORM_SKIP, Boolean.TRUE);
// skip the service executor and goto the end of the chain.
message.getInterceptorChain().doInterceptStartingAt(
message,
OutgoingChainInterceptor.class.getName());
}
}
protected void cleanUpOutInterceptors(Message outMessage) {
// TODO - how can I improve this to provide a specific interceptor chain that just has the
// stax, gzip and message sender components, while also ensuring that GZIP is only provided
// if its already configured for the endpoint.
Iterator<Interceptor<? extends Message>> iterator = outMessage.getInterceptorChain().iterator();
while (iterator.hasNext()) {
Interceptor<? extends Message> inInterceptor = iterator.next();
if (!inInterceptor.getClass().equals(StaxOutInterceptor.class)
&& !inInterceptor.getClass().equals(GZIPOutInterceptor.class)
&& !inInterceptor.getClass().equals(MessageSenderInterceptor.class)) {
outMessage.getInterceptorChain().remove(inInterceptor);
}
}
}
private Document getDocument(WSDLGetUtils utils,
Message message, String base,
Map<String, String> params, String ctxUri) {
// cannot have two wsdl's being generated for the same endpoint at the same
// time as the addresses may get mixed up
// For WSDL's the WSDLWriter does not share any state between documents.
// For XSD's, the WSDLGetUtils makes a copy of any XSD schema documents before updating
// any addresses and returning them, so for both WSDL and XSD this is the only part that
// needs
// to be synchronized.
synchronized (message.getExchange().getEndpoint()) {
return utils.getDocument(message, base, params, ctxUri,
message.getExchange().getEndpoint().getEndpointInfo());
}
}
private boolean isRecognizedQuery(Map<String, String> map) {
return map.containsKey("wsdl") || map.containsKey("xsd");
}
}

View File

@ -0,0 +1,107 @@
/*-
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2025 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.services.runtime.interceptor;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.security.SecurityContext;
import org.apache.cxf.transport.http.Headers;
import ru.entaxy.platform.core.support.runtime.cxf.security.AnonymousSecurityContext;
public class PublicOpenApiSchemaInterceptor extends AbstractPhaseInterceptor<Message> {
private static final Log LOG = LogFactory.getLog(PublicOpenApiSchemaInterceptor.class);
public static final List<String> SERVICE_SCHEMA_QUERY = new ArrayList<>();
public static final List<String> SERVICE_SCHEMA_FILE = new ArrayList<>();
static {
// SERVICE_SCHEMA_QUERY.add("wsdl");
SERVICE_SCHEMA_QUERY.add("_wadl");
SERVICE_SCHEMA_QUERY.add("swagger.json");
SERVICE_SCHEMA_QUERY.add("open-api.json");
SERVICE_SCHEMA_QUERY.add("open-api.yaml");
SERVICE_SCHEMA_FILE.add(".*\\/openapi\\.json");
SERVICE_SCHEMA_FILE.add(".*\\/openapi\\.yaml");
SERVICE_SCHEMA_FILE.add(".*\\/favicon.*\\.png");
SERVICE_SCHEMA_FILE.add(".*api-docs");
SERVICE_SCHEMA_FILE.add(".*\\/swagger-ui[^.]*\\.\\w*");
}
public PublicOpenApiSchemaInterceptor() {
super(Phase.RECEIVE);
}
@Override
public void handleMessage(Message message) throws Fault {
Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);
boolean isAllowedSchemaRequest = checkOnSchema(message);
if (isAllowedSchemaRequest) {
// we create simple SecurityContext with anonymous user
message.put(SecurityContext.class, new AnonymousSecurityContext());
}
headers.put(AnonymousSecurityContext.HEADER_IS_DISPLAY_SERVICE_SERVICE,
Collections.singletonList(String.valueOf(isAllowedSchemaRequest)));
}
private boolean checkOnSchema(Message message) {
Object params = message.get(Message.QUERY_STRING);
for (String schema : SERVICE_SCHEMA_QUERY) {
if (params != null && Pattern.matches(schema, params.toString()))
return true;
}
params = message.get(Message.REQUEST_URL);
try {
URL requestUrl = new URL(params.toString());
for (String schema : SERVICE_SCHEMA_FILE) {
if (Pattern.matches(schema, requestUrl.getFile()))
return true;
}
} catch (Exception e) {
}
return false;
}
}

View File

@ -0,0 +1,60 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-impl
* ==========
* Copyright (C) 2020 - 2025 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.services.runtime.interceptor;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.security.LoginSecurityContext;
import org.apache.cxf.security.SecurityContext;
import org.apache.cxf.transport.http.Headers;
public class ResolveLoginInterceptor extends AbstractPhaseInterceptor<Message> {
public static final String HEADER_USER = "X-User";
public ResolveLoginInterceptor() {
super(Phase.POST_UNMARSHAL);
}
public void handleMessage(Message message) throws Fault {
SecurityContext sc = message.get(SecurityContext.class);
if ((sc != null) && (sc instanceof LoginSecurityContext)) {
LoginSecurityContext lsc = (LoginSecurityContext) sc;
String login = lsc.getUserPrincipal().getName();
Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);
headers.put(HEADER_USER, Collections.singletonList(login));
}
return;
}
}

View File

@ -0,0 +1,92 @@
/*-
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2025 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~~~~~~
*/
/**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package ru.entaxy.platform.services.runtime.interceptor;
import java.security.Principal;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.security.LoginSecurityContext;
import org.apache.cxf.security.SecurityContext;
import org.apache.cxf.transport.http.Headers;
import javax.ws.rs.ForbiddenException;
public class ResolveProfileNameInterceptor extends AbstractPhaseInterceptor<Message> {
public static final String SYSTEM_ROLE_PREFIX = "PROFILE_";
public static final String HEADER_SYSTEM_NAME = "X-SystemName";
public static final String HEADER_SYSTEM_UUID = "X-SystemUuid";
public static final String HEADER_SYSTEM_ID = "X-SystemId";
public ResolveProfileNameInterceptor() {
super(Phase.UNMARSHAL);
}
public void handleMessage(Message message) throws Fault {
SecurityContext sc = message.get(SecurityContext.class);
if ((sc != null) && (sc instanceof LoginSecurityContext)) {
LoginSecurityContext lsc = (LoginSecurityContext) sc;
boolean found = false;
for (Principal p : lsc.getUserRoles()) {
if (p.getName().startsWith(SYSTEM_ROLE_PREFIX)) {
Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);
String systemName = p.getName().substring(SYSTEM_ROLE_PREFIX.length());
headers.put(HEADER_SYSTEM_ID, Collections.singletonList(systemName));
headers.put(HEADER_SYSTEM_UUID, Collections.singletonList(systemName));
headers.put(HEADER_SYSTEM_NAME, Collections.singletonList(systemName));
found = true;
break;
}
}
if (!found) {
throw new Fault(new ForbiddenException("Associated profile not found"));
}
}
return;
}
}

View File

@ -0,0 +1,130 @@
/*-
* ~~~~~~licensing~~~~~~
* system-commons
* ==========
* Copyright (C) 2020 - 2025 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.services.runtime.interceptor;
import java.io.IOException;
import java.util.List;
import javax.xml.soap.SOAPMessage;
import javax.xml.stream.XMLStreamException;
import javax.xml.transform.dom.DOMSource;
import javax.xml.validation.Schema;
import javax.xml.validation.Validator;
import javax.xml.xpath.XPathExpressionException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.cxf.binding.soap.SoapMessage;
import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.service.Service;
import org.apache.cxf.service.model.ServiceModelUtil;
import org.apache.cxf.ws.addressing.EndpointReferenceUtils;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;
import ru.entaxy.platform.services.runtime.utils.XmlParser;
public class SOAPValidateInterceptor extends AbstractPhaseInterceptor<SoapMessage> {
private static final Log LOG = LogFactory.getLog(SOAPValidateInterceptor.class);
private final SAAJInInterceptor saajIn;
private final XmlParser xmlParser;
private boolean schemaValidationEnabled;
public SOAPValidateInterceptor() {
super(Phase.PRE_PROTOCOL);
saajIn = new SAAJInInterceptor();
xmlParser = new XmlParser();
getAfter().add(SAAJInInterceptor.class.getName());
}
@Override
public void handleMessage(SoapMessage message) throws Fault {
if (isGET(message) || !schemaValidationEnabled) {
return;
}
try {
Node body = getMessageBody((DOMSource) getSOAPMessage(message).getSOAPPart().getContent());
if (body != null)
validate(body, message);
else
throw new XMLStreamException("Can't find the tag \"Body\"");
} catch (RuntimeException re) {
throw re;
} catch (Exception e) {
throw new Fault(e);
}
}
private Node getMessageBody(DOMSource source) throws XPathExpressionException {
Node node = source.getNode().cloneNode(true);
List<Node> nodeList = xmlParser.getNodes(node.getLastChild(), "Body");
return !nodeList.isEmpty() ? nodeList.get(0) : null;
}
private void validate(Node node, SoapMessage soapMessage)
throws IOException, SAXException, XPathExpressionException {
Validator validator = getValidator(soapMessage);
validator.validate(new DOMSource(getNodeForValidate(node)));
}
private Node getNodeForValidate(Node node) throws XPathExpressionException {
if (schemaValidationEnabled && node.getLocalName().contains("packets")) {
Element element = (Element) node;
for (Node content : xmlParser.getNodes(element, "content")) {
content.getParentNode().removeChild(content);
}
return element;
}
return node;
}
private Validator getValidator(SoapMessage soapMessage) {
Service service = ServiceModelUtil.getService(soapMessage.getExchange());
Schema schema =
EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), soapMessage.getExchange().getBus());
return schema.newValidator();
}
private SOAPMessage getSOAPMessage(SoapMessage smsg) {
SOAPMessage soapMessage = smsg.getContent(SOAPMessage.class);
if (soapMessage == null) {
saajIn.handleMessage(smsg);
soapMessage = smsg.getContent(SOAPMessage.class);
}
return soapMessage;
}
public void setSchemaValidationEnabled(boolean schemaValidationEnabled) {
this.schemaValidationEnabled = schemaValidationEnabled;
}
}

View File

@ -0,0 +1,41 @@
/*-
* ~~~~~~licensing~~~~~~
* system-commons
* ==========
* Copyright (C) 2020 - 2025 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.services.runtime.interceptor;
/**
* @Deprecated copied from legacy 'system-commons' for backward compatibility
*/
@Deprecated(since = "1.10", forRemoval = true)
public class SystemHeadersConstants {
public static final String HEADER_USER_LOGIN = "X-ForwardedUser";
public static final String HEADER_USER_ID = "X-ForwardedUserId";
public static final String HEADER_SYSTEM_NAME = "X-SystemName";
public static final String HEADER_SYSTEM_UUID = "X-SystemUuid";
public static final String HEADER_SYSTEM_ID = "X-SystemId";
public static final String HEADER_IS_DISPLAY_SERVICE_SERVICE = "NTX_IsDisplayServiceSchema";
private SystemHeadersConstants() {}
}

View File

@ -0,0 +1,62 @@
/*-
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2025 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.services.runtime.interceptor.jwt;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactConsumer;
import org.apache.cxf.rs.security.jose.jwt.JwtToken;
import javax.ws.rs.ForbiddenException;
import java.util.List;
import java.util.Map;
public interface GetterToken {
public static final String CXF_MESSAGE_PROTOCOL_HEADERS = "org.apache.cxf.message.Message.PROTOCOL_HEADERS";
public static final String AUTHORIZATION = "Authorization";
public static final String REALM_ACCESS = "realm_access";
public static final String ROLES = "roles";
default JwtToken getJwtToken(Message message) {
Map headersMap = (Map) message.get(CXF_MESSAGE_PROTOCOL_HEADERS);
List authorization = (List)headersMap.get(AUTHORIZATION);
if (authorization == null || authorization.isEmpty())
throw new Fault(new ForbiddenException("Header Authorization not found. Associated profile not found"));
String authorizationString = (String)authorization.get(0);
String[] fullToken = authorizationString.split(" ");
if (fullToken.length != 2)
throw new Fault(new ForbiddenException("Header Authorization not correctly. Associated profile not found"));
String token = fullToken[1];
JwsJwtCompactConsumer jwtConsumer = new JwsJwtCompactConsumer(token);
JwtToken jwt = jwtConsumer.getJwtToken();
return jwt;
}
}

View File

@ -0,0 +1,96 @@
/*-
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2025 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~~~~~~
*/
/**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package ru.entaxy.platform.services.runtime.interceptor.jwt;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.rs.security.jose.jwt.JwtClaims;
import org.apache.cxf.rs.security.jose.jwt.JwtToken;
import org.apache.cxf.transport.http.Headers;
import ru.entaxy.platform.core.support.runtime.cxf.security.AnonymousSecurityContext;
import ru.entaxy.platform.services.runtime.interceptor.ResolveProfileNameInterceptor;
import javax.ws.rs.ForbiddenException;
import java.util.Collections;
import java.util.List;
import java.util.Map;
public class ResolveProfileNameFromTokenInterceptor extends ResolveProfileNameInterceptor implements GetterToken {
public ResolveProfileNameFromTokenInterceptor() {}
public void handleMessage(Message message) throws Fault {
Object securityContext = message.get("org.apache.cxf.security.SecurityContext");
if (securityContext instanceof AnonymousSecurityContext) {
return;
}
JwtToken jwt = getJwtToken(message);
JwtClaims claims = jwt.getClaims();
Map realmAccess = (Map)claims.getClaim(REALM_ACCESS);
if (realmAccess == null || realmAccess.isEmpty()) {
throw new Fault(new ForbiddenException("Real access not found. Associated profile not found"));
}
List<String> roles = (List)realmAccess.get(ROLES);
if (roles == null || roles.isEmpty()) {
throw new Fault(new ForbiddenException("Poles not found. Associated profile not found"));
}
boolean found = false;
for (String role : roles) {
if (role.startsWith(SYSTEM_ROLE_PREFIX)) {
Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);
String systemName = role.substring(SYSTEM_ROLE_PREFIX.length());
headers.put(HEADER_SYSTEM_ID, Collections.singletonList(systemName));
headers.put(HEADER_SYSTEM_UUID, Collections.singletonList(systemName));
headers.put(HEADER_SYSTEM_NAME, Collections.singletonList(systemName));
found = true;
break;
}
}
if (!found) {
throw new Fault(new ForbiddenException("Associated profile not found"));
}
return;
}
}

View File

@ -0,0 +1,66 @@
/*-
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2025 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.services.runtime.interceptor.jwt;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor;
import org.apache.cxf.message.Message;
import org.apache.cxf.rs.security.jose.jwt.JwtClaims;
import org.apache.cxf.rs.security.jose.jwt.JwtToken;
import javax.ws.rs.ForbiddenException;
import java.util.List;
import java.util.Map;
public class SimpleAuthorizingFromTokenInterceptor extends SimpleAuthorizingInterceptor implements GetterToken {
public void handleMessage(Message message) {
JwtToken jwt = getJwtToken(message);
JwtClaims claims = jwt.getClaims();
Map realmAccess = (Map)claims.getClaim(REALM_ACCESS);
if (realmAccess == null || realmAccess.isEmpty()) {
throw new Fault(new ForbiddenException("Real access not found. Associated profile not found"));
}
List<String> roles = (List)realmAccess.get(ROLES);
if (roles == null || roles.isEmpty()) {
throw new Fault(new ForbiddenException("Poles not found. Associated profile not found"));
}
boolean found = false;
for (String role : roles) {
for (String globalRole : globalRoles) {
if (role.equals(globalRole)) {
found = true;
break;
}
}
}
if (!found) {
throw new Fault(new ForbiddenException("Associated profile not found"));
}
}
}

View File

@ -0,0 +1,39 @@
/*-
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2025 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.services.runtime.resolver;
import static java.util.Collections.singletonList;
import org.hibernate.validator.HibernateValidator;
import javax.validation.ValidationProviderResolver;
import java.util.List;
public class HibernateValidationProviderResolver implements ValidationProviderResolver {
@Override
public List getValidationProviders() {
return singletonList(new HibernateValidator());
}
}

View File

@ -0,0 +1,56 @@
/*-
* ~~~~~~licensing~~~~~~
* system-commons
* ==========
* Copyright (C) 2020 - 2025 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.services.runtime.utils;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import javax.xml.xpath.*;
import java.util.ArrayList;
import java.util.List;
public class XmlParser {
public List<Node> getNodes(Node node, String elementName) throws XPathExpressionException {
XPath xpath = XPathFactory.newInstance().newXPath();
XPathExpression expr = xpath.compile("//*[local-name()='" + elementName + "']/child::node()");
NodeList nodeList = (NodeList) expr.evaluate(node.getOwnerDocument(), XPathConstants.NODESET);
return getNotNullNodes(nodeList);
}
private List<Node> getNotNullNodes(NodeList nodeList) {
List<Node> result = new ArrayList<>();
for (int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
if (node.getLocalName() != null) {
result.add(node);
}
}
return result;
}
}

View File

@ -3,7 +3,7 @@
~~~~~~licensing~~~~~~
service-runtime
==========
Copyright (C) 2020 - 2024 EmDev LLC
Copyright (C) 2020 - 2025 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