【问题标题】:oracle.stellent.ridc.protocol.http.HttpProtocolException: Http status: HTTP/1.1 401 Authorization Requiredoracle.stellent.ridc.protocol.http.HttpProtocolException:Http 状态:HTTP/1.1 401 需要授权
【发布时间】:2023-03-11 22:06:01
【问题描述】:

我在使用 oracle UCM 10 g 的 RIDC 代码 ping 服务器时遇到一些问题,并且我收到 HTTP/1.1 401 Authorization Required 异常。

import java.util.logging.Level;
import java.util.logging.Logger;
import oracle.stellent.ridc.IdcClient;
import oracle.stellent.ridc.IdcClientException;
import oracle.stellent.ridc.IdcClientManager;
import oracle.stellent.ridc.IdcContext;
import oracle.stellent.ridc.model.DataBinder;
import oracle.stellent.ridc.protocol.ServiceResponse;

public class PingGuest {
IdcClientManager manager = new IdcClientManager();

IdcClient idcClient;

public PingGuest() throws IdcClientException {
    this.idcClient = manager.createClient("Server Address");
    idcClient.getConfig ().setProperty ("http.library", "apache4");
    IdcContext userPasswordContext = new IdcContext("user", "pass");
    DataBinder dataBinder = this.idcClient.createBinder ();
    dataBinder.putLocal ("IdcService", "PING_SERVER");
    ServiceResponse response = idcClient.sendRequest (userPasswordContext, dataBinder);
}
public static void main(String args[]){
    try {
        new PingGuest();
    } catch (IdcClientException ex) {
        Logger.getLogger(PingGuest.class.getName()).log(Level.SEVERE, null, ex);
    }
}
}

这是错误。

oracle.stellent.ridc.protocol.http.HttpProtocolException: Http status: HTTP/1.1 401 Authorization Required

感谢任何形式的帮助。

【问题讨论】:

  • 您需要使用 HTTP 连接吗?如果没有,您是否尝试过使用套接字连接?
  • 感谢您的回复,它允许我通过 Internet 登录,但我需要它通过 Intranet 登录,所以我发送 Auth Type Intranet 然后它将显示此异常。

标签: oracle-ucm


【解决方案1】:

您遗漏了您的服务器地址。我理解你为什么省略它,但弄错可能会导致你看到的问题。如果您阅读过较新的文档,请记住它在旧版本中会有所不同。

【讨论】:

  • 什么意思?
猜你喜欢
  • 2011-09-26
  • 2019-02-19
  • 2021-05-04
  • 2020-08-12
  • 1970-01-01
  • 2011-03-18
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多