In my JAR client that i developed, When trying to call a soap ws using jax-ws i got connection timeout exception, i want to know what can be the reasons that causes this exception. I am using a remote wsdl, and server certificate for https that must be run in VM arguments.
-Djavax.net.debug=all
-Djavax.net.ssl.trustStore=link to my certifacte
How can i run with this arguments? By adding them eclipse.ini file ? Thanks for your help.
Adding an additional troubleshooting answer. A great way to test SSL connectivity. Source: 4ndrej awesome SSL Poke GitHUB example
If everything works correctly you'll get "Successfully Connected"
1. Select you project from the Project Explorer Pane, generally on the left
2. From the Run menu, depending on whether you want to just run it or debug it click either Run or Debug
3. In left pane, select "Java Application and right click and click New"
4. Since you've already selected your project and it contains a "Main" class, it will default the Run/Debug configuration "Name" to the class name. If you have multiple Main's, you may have to click the Search button or manually type in the package path and class name
5. Enter your arguments under "VM arguments" as shown
6. Click Apply, or Apply and the Run if you want to run it immediately
Some notes, you'll likely need the full path to the keystore such as:
-Djavax.net.ssl.trustStore=C:\ADirectory\AnotherDirectory\FinalDirectoryThatContainsYourKeystore\TrustStore.jks
-Djavax.net.debug=all
- is going to turn on a MASSIVE amount of debug which if you're not used to reading it, it can be confusing. If the connection works remove that line. If the connection doesn't work - thats when all that debug is useful.Update: to further troubleshoot HTTP connectivity problems, when at the heart of it thats what a SOAP request is, temporarily remove the
-Djavax.net.debug=all
and add the following instead:-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true
-Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true
-Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true
-Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dump=true
This will show you the HTTP headers, response code, request and response body contents. It will also show the URL you are trying to connect to.