我们正在尝试使用https://www.docusign.net/API/3.0/从 Docusing 访问网络服务 。我们在下面收到禁止访问消息。我们也无法从浏览器中访问 URL。
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.
在执行代码期间,我们在执行以下方法时收到 UnknownHostException。最后一行代码在创建客户端时产生错误。我们已经验证了我们的凭据,一切似乎都井然有序。
public static APIServiceSoap getAPI(HttpServletRequest request) {
HttpSession session = request.getSession();
DocuSignAPICredentials apiCreds = new DocuSignAPICredentials();
apiCreds.setAccountId(session.getAttribute(Utils.SESSION_ACCOUNT_ID)
.toString());
apiCreds.setUserId(session.getAttribute(Utils.SESSION_USER_ID)
.toString());
apiCreds.setIntegratorsKey(session.getAttribute(
Utils.SESSION_INTEGRATORS_KEY).toString());
apiCreds.setPassword(session.getAttribute(Utils.SESSION_PASSWORD)
.toString());
apiCreds.setUserEmail(session.getAttribute(Utils.SESSION_EMAIL)
.toString());
apiCreds.setDocusignWebserviceEndpoint(session.getAttribute(
Utils.DOCUSIGN_WEBSERVICE_ENDPOINT).toString());
DocusignWebserviceFactory wsFactory = new DocusignWebserviceFactory();
wsFactory.setEmail(apiCreds.getUserEmail());
wsFactory.setIntegratorsId(apiCreds.getIntegratorsKey());
wsFactory.setUserId(apiCreds.getUserId());
// Error when executing the next line
return wsFactory.setupClient(apiCreds.getDocusignWebserviceEndpoint())
.authorizeAPI(apiCreds);
}
Caused by: java.net.UnknownHostException: demo.docusign.net
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:227)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:377)
at java.net.Socket.connect(Socket.java:539)
at sun.net.NetworkClient.doConnect(NetworkClient.java:170)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:407)
Please help me. Thanks.