We have a java web application which makes a soap request to salesforce to get some data. We moved to production today and we noticed that on some requests, we are getting a connection refused error message from salesforce on the java client. Some requests get through easily but some of them drop connections. We never experienced these on our sandboxes and we face them in production. Has anybody faced these issues and how do we debug them? Please let me know ..

The error message is:

org.apache.axis2.transport.http.HTTPSender sendViaPost Unable to sendViaPost to url[na15.salesforce.com/services/Soap/u/27.0/] java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method)
  • Are all the requests coming from the same source (IP address)? What authorization are you using?
    – Doug B
    Jun 25 '13 at 8:24
  • You might be calling Salesforce from too many processes in parallel with the same license ? The API is throttled, if I remember correctly. Your timeout might be something to check.
    – altius_rup
    Oct 16 '13 at 6:09

salesforce have released wsc.jar for java to connect with salesforce.

It uses apache httpconnection to make connection. I used it earlier, and it works perfect.

You should user partner or enterprise wsdl to do things with salesforce.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.