Приложение логики, развернутое с помощью шаблона ARM с настраиваемым соединителем (SOAP Passthrough), настроено неправильно - PullRequest
0 голосов
/ 11 июля 2019

У меня есть приложение логики, которое содержит действие, использующее пользовательский соединитель. Пользовательский разъем - это проход SOAP.

Все разворачивается через ARM Template. При развертывании все выглядит нормально, кроме действия для настраиваемого соединителя. Там написано «Разъем не найден». Но если я удаляю это и добавляю новое действие из конструктора приложений логики, кажется, все работает как надо. Поэтому я считаю, что настраиваемый разъем и соединения API настраиваются правильно, но по какой-то причине действие настроено неправильно.

Connector - это SOAP Passthrough, настроенный для использования локального шлюза данных.

enter image description here

Вот шаблон ARM (я удалил конфиденциальную информацию)

{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
    "logicAppName": {
        "type": "string",
        "metadata": {
          "description": "Name of the Logic App."
        },
        "defaultValue": "TestLogicAppCustomConnector"
      },
    "logicAppLocation": {
        "type": "string",
        "defaultValue": "[resourceGroup().location]",
        "allowedValues": [
          "[resourceGroup().location]",
          "eastasia",
          "southeastasia",
          "centralus",
          "eastus",
          "eastus2",
          "westus",
          "northcentralus",
          "southcentralus",
          "northeurope",
          "westeurope",
          "japanwest",
          "japaneast",
          "brazilsouth",
          "australiaeast",
          "australiasoutheast",
          "southindia",
          "centralindia",
          "westindia",
          "canadacentral",
          "canadaeast",
          "uksouth",
          "ukwest",
          "westcentralus",
          "westus2"
        ],
        "metadata": {
          "description": "Location of the Logic App."
        }
      },
    "customApis_RemedyConnector_name": {
        "type": "string",
        "defaultValue": "remedyconnector"
    },
    "connections_RemedyConnector_name": {
        "type": "string",
        "defaultValue": "RemedyPassThroughConnection"
    },
    "connections_RemedyConnector_DisplayName": {
        "type": "string",
        "defaultValue": "Remedy PassThrough SOAP Connection"
    },
    "remedy_Host": {
        "type": "string",
        "defaultValue": "server.company.com:8080"
    },
    "remedy_Base_Path": {
        "type": "string",
        "defaultValue": "/service"
    },
    "remedy_username": {
        "type": "string",
        "defaultValue": "username"
    },
    "remedy_password": {
        "type": "string",
        "defaultValue": "pwd"
    },
    "onPremDataGateway_name": {
        "type": "string",
        "defaultValue": "on-prem-gateway"
    },
    "onPremDataGatewayRG_name": {
        "type": "string",
        "defaultValue": "gateway-rg"
    }
},
"variables": {
    "remedy_webservice_full_url": "[concat('http://',parameters('remedy_Host'),parameters('remedy_Base_Path'))]"
},
"resources": [
    {
        "type": "Microsoft.Web/customApis",
        "apiVersion": "2016-06-01",
        "name": "[parameters('customApis_RemedyConnector_name')]",
        "location": "[parameters('logicAppLocation')]",
        "tags": {
            "displayName": "RemedyCustomConnector"
        },
        "properties": {
            "connectionParameters": {
                "username": {
                    "type": "securestring",
                    "uiDefinition": {
                        "displayName": "userName",
                        "description": "The userName for this api",
                        "tooltip": "Provide the userName",
                        "constraints": {
                            "tabIndex": 2,
                            "clearText": true,
                            "required": "true",
                            "capability": [
                                "gateway"
                            ]
                        }
                    }
                },
                "password": {
                    "type": "securestring",
                    "uiDefinition": {
                        "displayName": "password",
                        "description": "The password for this api",
                        "tooltip": "Provide the password",
                        "constraints": {
                            "tabIndex": 3,
                            "clearText": false,
                            "required": "true",
                            "capability": [
                                "gateway"
                            ]
                        }
                    }
                },
                "authType": {
                    "type": "string",
                    "allowedValues": [
                        {
                            "value": "basic"
                        }
                    ],
                    "uiDefinition": {
                        "displayName": "Authentication Type",
                        "description": "Authentication type to connect to your API",
                        "tooltip": "Authentication type to connect to your API",
                        "constraints": {
                            "tabIndex": 1,
                            "required": "true",
                            "allowedValues": [
                                {
                                    "text": "basic",
                                    "value": "basic"
                                }
                            ],
                            "capability": [
                                "gateway"
                            ]
                        }
                    }
                },
                "gateway": {
                    "type": "gatewaySetting",
                    "gatewaySettings": {
                        "dataSourceType": "CustomConnector",
                        "connectionDetails": []
                    },
                    "uiDefinition": {
                        "constraints": {
                            "tabIndex": 4,
                            "required": "true",
                            "capability": [
                                "gateway"
                            ]
                        }
                    }
                }
            },
            "description": "SOAP pass-through for Remedy Calls",
            "displayName": "[parameters('customApis_RemedyConnector_name')]",
            "backendService": {
                "serviceUrl": "[variables('remedy_webservice_full_url')]"
            },
            "apiType": "Soap",
            "wsdlDefinition": {
                "importMethod": "SoapPassThrough"
            },
            "capabilities": [
                "gateway"
            ],
            "swagger": {
                "swagger": "2.0",
                "info": {
                    "title": "SOAP pass-through",
                    "description": "SOAP pass-through for Remedy Calls",
                    "version": "1.0"
                },
                "host": "[parameters('remedy_Host')]",
                "basePath": "[parameters('remedy_Base_Path')]",
                "consumes": [],
                "produces": [],
                "paths": {
                    "/SoapPassThrough": {
                        "post": {
                            "operationId": "SoapPassThrough",
                            "parameters": [
                                {
                                    "name": "server",
                                    "in": "query",
                                    "required": true,
                                    "type": "string",
                                    "default": "servername",
                                    "x-ms-visibility": "important",
                                    "enum": [
                                        "servername"
                                    ]
                                },
                                {
                                    "name": "webService",
                                    "in": "query",
                                    "required": true,
                                    "type": "string",
                                    "default": "FRIntegration",
                                    "x-ms-visibility": "important",
                                    "enum": [
                                        "FRIntegration"
                                    ]
                                },
                                {
                                    "name": "Content-Type",
                                    "in": "header",
                                    "required": false,
                                    "type": "string",
                                    "default": "text/xml",
                                    "enum": [
                                        "text/xml"
                                    ]
                                },
                                {
                                    "name": "SOAPAction",
                                    "in": "header",
                                    "required": false,
                                    "type": "string",
                                    "default": "urn:FRIntegration/OpCreate",
                                    "enum": [
                                        "urn:FRIntegration/OpCreate"
                                    ]
                                },
                                {
                                    "name": "body",
                                    "in": "body",
                                    "required": true,
                                    "schema": {
                                        "type": "object",
                                        "properties": {},
                                        "x-ms-visibility": "important"
                                    },
                                    "x-ms-visibility": "important"
                                }
                            ],
                            "responses": {
                                "200": {
                                    "description": "OK"
                                }
                            },
                            "summary": "Update",
                            "description": "Update Remedy Record",
                            "x-ms-visibility": "important"
                        }
                    }
                },
                "definitions": {},
                "parameters": {},
                "responses": {},
                "securityDefinitions": {
                    "basic_auth": {
                        "type": "basic"
                    }
                },
                "security": [],
                "tags": [],
                "schemes": [
                    "http"
                ]
            }
        }
    },
    {
        "type": "MICROSOFT.WEB/CONNECTIONS",
        "apiVersion": "2016-06-01",
        "name": "[parameters('connections_RemedyConnector_name')]",
        "location": "[parameters('logicAppLocation')]",
        "tags": {
            "displayName": "RemedyConnection"
        },
        "properties": {
            "api": {
                "id": "[resourceId('Microsoft.Web/customApis', parameters('customApis_RemedyConnector_name'))]"
            },
            "displayName": "[parameters('connections_RemedyConnector_DisplayName')]",
            "parameterValues": {
                "authType": "Basic",
                "userName": "[parameters('remedy_username')]",
                "password": "[parameters('remedy_password')]",
                "gateway": {
                    "id": "[concat(subscription().id, '/resourceGroups/',parameters('onPremDataGatewayRG_name'),'/providers/Microsoft.Web/connectionGateways/',parameters('onPremDataGateway_name'))]"
                }
            }
        },
        "dependsOn": [
            "[resourceId('Microsoft.Web/customApis', parameters('customApis_RemedyConnector_name'))]"
        ]
    },
    {
        "name": "[parameters('logicAppName')]",
        "type": "Microsoft.Logic/workflows",
        "location": "[parameters('logicAppLocation')]",
        "apiVersion": "2016-06-01",
        "tags": {
            "displayName": "Test-LogicApp-CustomConnector"
        },
        "properties": {
            "definition": {
                "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
                "actions": {
                    "Compose_Soap_Envelope": {
                        "inputs": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:FRIntegration\"><soapenv:Header></soapenv:Header><soapenv:Body><urn:OpCreate></urn:OpCreate></soapenv:Body></soapenv:Envelope>",
                        "runAfter": {
                        },
                        "type": "Compose"
                    },
                    "Scope": {
                        "actions": {
                            "get_all": {
                                "inputs": {
                                    "body": "@outputs('Compose_Soap_Envelope')",
                                    "headers": {
                                        "Content-Type": "text/xml",
                                        "SOAPAction": "urn:FRIntegration/OpCreate"
                                    },
                                    "host": {
                                        "connection": {
                                            "name": "@parameters('$connections')['RemedyPassThrough']['connectionId']"
                                        }
                                    },
                                    "method": "post",
                                    "path": "/SoapPassThrouh",
                                    "queries": {
                                        "server": "<server>",
                                        "webService": "FRIntegration"
                                    },
                                    "retryPolicy": {
                                        "type": "none"
                                    },
                                    "authentication": {
                                        "type": "Basic"
                                    }
                                },
                                "runAfter": {},
                                "type": "ApiConnection"
                            }
                        },
                        "runAfter": {
                            "Compose_Soap_Envelope": [
                                "Succeeded"
                            ]
                        },
                        "type": "Scope"
                    },
                    "Compose": {
                        "inputs": {
                            "IncidentID": "INC0001",
                            "RequestStatus": "Fault Investigation",
                            "WorkLogID": "WorkLogID"
                        },
                        "runAfter": {
                            "Scope": [
                                "Succeeded"
                            ]
                        },
                        "type": "Compose"
                    },
                    "Response": {
                        "inputs": {
                            "body": "@outputs('Compose')",
                            "headers": {
                                "Content-Type": "application/json"
                            },
                            "schema": {
                                "properties": {
                                    "incidentID": {
                                        "type": "string"
                                    },
                                    "requestStatus": {
                                        "type": "string"
                                    },
                                    "workLogID": {
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            },
                            "statusCode": 201
                        },
                        "kind": "Http",
                        "runAfter": {
                            "Compose": [
                                "Succeeded"
                            ]
                        },
                        "type": "Response"
                    }
                },
                "parameters": {
                    "$connections": {
                        "defaultValue": {},
                        "type": "Object"
                    }
                },
                "triggers": {
                    "manual": {
                        "type": "Request",
                        "kind": "Http",
                        "inputs": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "workLogId": {
                                        "type": "object",
                                        "properties": {
                                            "workLogDateTime": {
                                                "type": "string"
                                            },
                                            "workLogDescription": {
                                                "type": "string"
                                            }
                                        }
                                    }
                                }
                            },
                            "method": "POST"
                        }
                    }
                },
                "contentVersion": "1.0.0.0",
                "outputs": {}
            },
            "parameters": {
                "$connections": {
                    "value": {
                        "RemedyPassThrough": {
                            "connectionId": "[resourceId('Microsoft.Web/connections', parameters('connections_RemedyConnector_name'))]",
                            "connectionName": "[parameters('connections_RemedyConnector_name')]",
                            "id": "[resourceId('Microsoft.Web/customApis', parameters('customApis_RemedyConnector_name'))]"
                        }
                    }
                }
            }
        },
        "resources": [
        ],
        "dependsOn": [
            "[resourceId('Microsoft.Web/customApis', parameters('customApis_RemedyConnector_name'))]",
            "[resourceId('Microsoft.Web/connections', parameters('connections_RemedyConnector_name'))]"
        ]
    }
]

}

Я также скачал и сравнил шаблон ARM для логического приложения, которое я разработал в конструкторе, но я не вижу никаких отличий. Я был бы признателен за любую помощь / указатели, чтобы разобраться в этом.

Спасибо Санджай

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...