0

Following the Examples of Docusign SDK located at https://github.com/docusign/DocuSign-SOAP-SDK

Trying to implement the Credential API, code is something listed below

public LoginResult getCredentialAPI() {
        CredentialSoap credApi = new CredentialFactory().getCredential(credentialURL);

        LoginResult result = credApi.login("[" + integratorKey + "]" + username, password, true);

        return result;

    }

I am getting a Connection Times out Error, The reason been I have to use Proxy connection setting to make the connection, where do I add the server URL and port for proxy connections. The class Credential Factory is listed below

public class CredentialFactory {

    /**
     * Builds the API interface in order to use the Docusign Credential API.
     *
     * @param webserviceEndpoint the endpoint for the credential webservice
     * @return the credential api stub
     */
    public CredentialSoap getCredential(String webserviceEndpoint) {
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

        setupService(factory, webserviceEndpoint);

        CredentialSoap credentialProxy = (CredentialSoap) factory.create();

        return credentialProxy;
    }

    /**
     * Set service class and webservice url.
     *
     * @param factory
     * @param webserviceEndpoint the endpoint for the credential webservice
     */
    protected void setupService(JaxWsProxyFactoryBean factory, String webserviceEndpoint) {
        factory.setServiceClass(CredentialSoap.class);
        factory.setAddress(webserviceEndpoint);
    }
}
avenirit12
  • 233
  • 2
  • 5
  • 17

1 Answers1

2

Proxy settings are stack-dependent. So the setting is usually below the level of the SOAP call. What stack are you using?

Judging from your variable name, you're using JAX-WS. In that case, see https://stackoverflow.com/a/6447240/64904

Community
  • 1
  • 1
Larry K
  • 47,808
  • 15
  • 87
  • 140