从 BPS (BPEL) 到 ESB 的 WSO2 请求缺少 soapAction header

WSO2 requests from BPS (BPEL) to ESB with missing soapAction header

我正在使用 WSO2 BPS 3.2.0、WSO2 应用程序服务器 5.2.1 和 WSO2 身份服务器 5.0.0。 我使 BPS 进程通过 HTTPS 与基本身份验证安全的 ESB 代理服务进行通信。过程有肥皂作用问题。请求以故障响应结束:

<message><fault><faultcode xmlns:soapenv="http://schemas.xmlsoap.org/soa...">axis2ns10:Client</faultcode><faultstring xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">The endpoint reference (EPR) for the Operation not found is /services/RepositoryService and the WSA Action = . If this EPR was previously reachable, please contact the server administrator.</faultstring></fault></message>

我使用来自 this blog 的 unified-endpoints(UEP)。

<wsa:EndpointReference
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.w3schools.com uep_schema.xsd"
    xmlns:wsa="http://www.w3.org/2005/08/addressing"
    xmlns:wsdl11="http://schemas.xmlsoap.org/wsdl/">
    <wsa:Action>http://docs.oasis-open.org/ns/cmis/ws/200908/RepositoryServicePort/getRepositoriesRequest</wsa:Action>
    <wsa:Metadata>
       <id>SInvokeEPR</id>
       <transport type="http">
       <authorization-username>user</authorization-username>
       <authorization-password>pass</authorization-password>
       </transport>
   </wsa:Metadata>
</wsa:EndpointReference>

我发现了 assign 的一些可能性

<bpel:literal>
<wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/ns/cmis/ws/200908/RepositoryServicePort/getRepositoriesRequest</wsa:Action>
</bpel:literal>

输出变量属性

<bpel:to variable="RepositoryServicePLRequest" header="Action"></bpel:to>

但是没有用。但是我发现当我在 ESB 中启用 SOAP Message Tracer 时它开始工作。为什么?

您可以使用此 post
中的修复 添加参数

<parameter name="disableOperationValidation" locked="false">true</parameter>

WSO2 ESB 中的代理 conf

过去两天我一直在解决这个问题。我对你的问题和你的回答有几点看法。让你知道我没有 ESB,所以我有同样的问题,但我不能使用这种方法来解决它。

首先检查您的第一个 link,您发现没有 wsa:Action,因此您需要指定 wsa:address。

第二个问题是你的SOAPACTION没有设置。如果您使用 SOAP 1.1,则需要此 header,因此 BPS 为您将其设置为“”,但大多数服务器需要实际操作。要解决此问题,您需要在 epr 文件中启用寻址。这有点令人困惑,因为它添加了正确的 ws-addressing 信息,但它控制与其无关的 SOAPACTION。

所以要解决这个问题,只需像这样输入你的 epr:

<wsa:EndpointReference
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com uep_schema.xsd"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:wsdl11="http://schemas.xmlsoap.org/wsdl/">
**<wsa:Address>http://docs.oasis-open.org/ns/cmis/ws/200908/RepositoryServicePort</wsa:Address>**
<wsa:Metadata>
   <id>SInvokeEPR</id>
   <transport type="http">
   <authorization-username>user</authorization-username>
   <authorization-password>pass</authorization-password>
   </transport>
   **<qos>
        <enableAddressing version="final" separateListener="true"/>
    </qos>**