Reputation: 1
We are trying to access the webservice from Docusing using https://www.docusign.net/API/3.0/. We are receiving Forbidden Access msg below. We are unable to hit the URL from a browser also.
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.
During execution of the code we receive UnknownHostException when executing the below method. The last line of code generates the error when creating a client. We have validated our credentials and all appears to be in order.
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.
Upvotes: 0
Views: 2199
Reputation: 5489
There is java.net.UnknownHostException meaning that the IP address of the host cannot be determined. It is possible that you need a proxy to access the Internet from your LAN.
Here is a link explaining how to set it up with your java code but maybe Docusign API provides it.
Upvotes: 2