我正在尝试使用Azure Apim进行肥皂传递。当我直接从机体读取请求时,可以访问肥皂请求。但是,如果我使用send-request,则无法读取请求数据。有人遇到过这个问题吗?
肥皂请求数据:
<?xml version="1.0" encoding="utf-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<GetOpenOrders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/">
<cust>1001</cust>
</GetOpenOrders>
</Body>
</Envelope>
直接在机体内读取请求
<inbound>
<set-body template="liquid">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header />
<soapenv:Body>
<tem:GetOpenOrders>
<!--Optional:-->
<tem:cust>{{body.Envelope.Body.GetOpenOrders.cust}}</tem:cust>
</tem:GetOpenOrders>
</soapenv:Body>
</soapenv:Envelope>
</set-body>
<base />
</inbound>
可以看到参数值1001已传递到后端
当尝试在send-request中读取请求时
<inbound>
<send-request mode="new" response-variable-name="countries" timeout="40" ignore-error="false">
<set-url>http://fazioapisoap.azurewebsites.net/FazioService.svc</set-url>
<set-method>POST</set-method>
<set-header name="SOAPAction" exists-action="override">
<value>"http://tempuri.org/IFazioService/GetOpenOrders"</value>
</set-header>
<set-header name="Content-Type" exists-action="override">
<value>text/xml</value>
</set-header>
<set-body template="liquid">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header />
<soapenv:Body>
<tem:GetOpenOrders>
<!--Optional:-->
<tem:cust>{{body.Envelope.Body.GetOpenOrders.cust}}</tem:cust>
</tem:GetOpenOrders>
</soapenv:Body>
</soapenv:Envelope>
</set-body>
</send-request>
<base />
</inbound>