我在使用oracle UCM 10g的RIDC代码With服务器时遇到了一些问题,并且我得到了HTTP/1.1 401 Authorization Required exception。
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任何形式的帮助都是值得感谢的。
发布于 2017-04-17 04:50:53
我理解您为什么省略了它,但如果弄错了,可能会导致您看到的问题。如果您阅读过较新的文档,请记住它在旧版本中略有不同。
https://stackoverflow.com/questions/43347558
复制相似问题