cancel
Showing results for 
Search instead for 
Did you mean: 

java.net.ConnectException: Connection timed out: connect

Hi All,

 

I am integrating Autherize.net in one of our ecommerce website.

The very first time i make call on  any API Method (createCustomerProfile), the result is successful. But when i invoke the same API method agian with different values, i am getting "java.net.ConnectException: Connection timed out: connect" Exception.

 

Please help on this !.

 

Here is the stack errors:

 

/*******************************************************************************************************************************/

at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
    at java.net.Socket.connect(Socket.java:529)
    at java.net.Socket.connect(Socket.java:478)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
    at sun.net.www.http.HttpClient$4.run(HttpClient.java:458)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.http.HttpClient.privilegedOpenServer(HttpClient.java:440)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:521)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConne...
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:949)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.jav...
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1014)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
    at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:109)
    ... 19 more

/*****************************************************************************************************************************/

 

Thanks in advance.

Velmurugan.

 

 

 

velmurugan
Member
3 REPLIES 3

If you use the same values from the first time does it still works?

 

Can you get to the

https://api.authorize.net/soap/v1/Service.asmx

or

https://apitest.authorize.net/soap/v1/Service.asmx

RaynorC1emen7
Expert

Hi Raynor,

First of all thaks for your quick reply.

I am able to get to this page. https://api.authorize.net/soap/v1/Service.asmx

 

Here is the summary :

 

I have downloaded sample code for Java CIM from autherize.net developer centre. It was working fine for n number of calls as a standalone app. Then i moved the same code to my web application. By clicking on some button i am triggering the same code.

Now the code execute for the first time only. The second time when i invoke the same button , i am gettting the "connection time out "

 

Could you give me an assistance?

 

Thanks,

velmurugan

 

 

 

 

 

 

 

 

The problem was with the code(static method)..

Now its working fine for n times.

thanks a  lot for your time.

 

Regards,

vel