【发布时间】:2018-01-15 22:28:37
【问题描述】:
我正在尝试使用 ARM 模板在 Azure APIM 中自动执行 SOAP 传递 API 部署。 以下是我遵循的步骤:
- 通过导入 WSDL 文件在 Azure 门户上创建 API。
- 使用“自动化脚本”从 APIM 实例生成和下载 API 的 ARM 配置。
- 为以下资源提取了此 ARM 模板并对其进行了参数化:
- Microsoft.ApiManagement/service/apis
- Microsoft.ApiManagement/service/apis/operations
- Microsoft.ApiManagement/service/apis/schemas
- Microsoft.ApiManagement/service/products/apis
- 使用 Visual Studio (2017) 在 Azure 上部署 ARM 模板。
API及其相关操作等部署成功。但是,我观察到以下两点:
- Azure APIM 未将此 API 标记为 SOAP。
- API 端点不起作用:我在尝试访问它时不断收到 404。
这是 API 的 ARM 模板:
{
"comments": "= = = API = = =",
"type": "Microsoft.ApiManagement/service/apis",
"name": "[concat(variables('apimInstanceName'), '/', parameters('apiName'))]",
"apiVersion": "2017-03-01",
"scale": null,
"properties": {
"displayName": "[parameters('apiName')]",
"apiRevision": "1",
"description": "SOAP service",
"serviceUrl": "[parameters('serviceUrl')]",
"path": "[parameters('apiName')]",
"protocols": [
"http",
"https"
],
"authenticationSettings": null,
"subscriptionKeyParameterNames": null,
"type": "soap",
"isCurrent": true,
"apiType": "soap"
},
"dependsOn": [
]
}
我没有发布其他组件的 ARM 模板只是为了检查这篇文章的长度。
我是否遗漏了 API 模板中的任何内容以使其按预期工作?
【问题讨论】:
-
经过进一步调查,我发现 APIM 公开的 SOAP 端点不是
/ 而是 / /?SOAPAction=tempuri.org/<SOAPServiceOperationName> -
如果解决了,您可以将其添加为答案,以帮助更多有相同问题的社区轻松搜索。
-
嗨@TomSun,它仍然没有解决,因为如果我的 API 有多个操作,上面提到的 URL 将不起作用。因此,我没有将其标记为答案。
标签: azure soap azure-api-management