0

我正在使用 eclipse bpel 设计器并尝试调用需要传递身份验证标头的外部服务。

这是我所做
的 1. 创建了一个 headers.endpoint 文件,内容如下

*alias.sample_ns="http://sample.com"  
sample_ns.serviceName.portName.ode.http.default-headers.username=system
sample_ns.serviceName.portName.ode.http.default-headers.password=admin*
  1. 将它放在 ..\webapps\ode\WEB-INF\processes\$process 文件夹中

当我调用该服务时,我收到以下错误
“发送消息时出错 (mex={PartnerRoleMex#hqejbhcnphrckf492s9n9b [PID { http://createReservation }CreateReservation-1541] 调用 org.apache.ode.bpel.epr.WSAEndpoint@1e1f4b8 .saveRecord(...) Status ASYNC}):传输错误:401 错误:Unautho”。

我认为在 BPEL 流程中调用服务时也需要添加标头信息。但是找不到办法。如果这实际上是我所缺少的,该怎么办?或者还有其他事情要做吗?

提前致谢

4

1 回答 1

0

注意:HTTP Auth 信息不能在 *.endpoint 文件中设置。

用于调用 HTTP 服务

Testcase 将向您展示如何做到这一点
https://github.com/apache/ode/tree/ode-1.3.x/axis2-war/src/test/resources/TestEndpointProperties

在 WSDL 中添加消息部分,如下所示
https://github.com/apache/ode/blob/ode-1.3.x/axis2-war/src/test/resources/TestEndpointProperties/Echo.wsdl#L66

在进程中分配凭据
https://github.com/apache/ode/blob/ode-1.3.x/axis2-war/src/test/resources/TestEndpointProperties/test-endpoint-properties.bpel#L73

用于调用肥皂服务

http://ode.apache.org/http-authentication.html

于 2017-08-31T06:10:54.613 回答