【发布时间】:2018-09-05 15:47:04
【问题描述】:
我们正在尝试在 WebSphere Liberty 上部署 EAR。
我们的应用程序包含一个 EJB 模块,该模块包含调用另一个 SOAP 服务器的 EJB。
服务的 WSDL 定义了一个 wsp:Policy,ExactlyOne 为 http:BasicAuthentication xmlns:http="http://schemas.microsoft.com/ws/06/2004/policy/http"/
部署后,当我们向应用程序发送请求时,会触发 SOAP 调用,我们会收到错误:None of the policy alternatives can be satisfied.
我找到了一些关于如何解决这个问题的 java 代码
HTTPConduit http = (HTTPConduit) client.getConduit();
http.getAuthorization().setUserName("user");
http.getAuthorization().setPassword("pass");
但我不想在 Java 代码中执行此操作,但我想将其作为服务器配置的一部分。
我找到了几个有用的链接,但仍然无法正常工作。 有人对我如何设置有任何建议吗?
【问题讨论】:
标签: http authentication soap client websphere-liberty