我有一个逻辑应用程序,其中包含使用自定义连接器的操作。定制连接器是SOAP直通。
所有内容都通过ARM模板部署。部署时,除了自定义连接器的操作外,其他所有内容都看起来不错。它说“找不到连接器”。但是,如果我删除了它并从Logic App设计器中添加了新操作,则一切似乎都可以正常工作。因此,我相信自定义连接器和api连接的设置正确,但是由于某种原因,操作没有正确设置。
连接器是配置为使用本地数据网关的SOAP直通。
这是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模板,但没有发现任何差异。我将不胜感激任何帮助/指针来解决这个问题。
谢谢 桑杰