首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >oracle.stellent.ridc.protocol.http.HttpProtocolException: Http状态:需要HTTP/1.1 401授权

oracle.stellent.ridc.protocol.http.HttpProtocolException: Http状态:需要HTTP/1.1 401授权
EN

Stack Overflow用户
提问于 2017-04-11 21:34:44
回答 1查看 420关注 0票数 1

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

代码语言:javascript
复制
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);
    }
}
}

这就是错误。

代码语言:javascript
复制
oracle.stellent.ridc.protocol.http.HttpProtocolException: Http status: HTTP/1.1 401 Authorization Required

任何形式的帮助都是值得感谢的。

EN

回答 1

Stack Overflow用户

发布于 2017-04-17 04:50:53

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43347558

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档