From wsdl to client java web service(Server has self signed certificate)

kraskixxx

I need to create web service client, the company which made service send us the wsdl files. I have wsdl files, username and password, service url's and txt file with some key like '20 a9 38 4e 82 3a 94 d1 ...'. The server has self signed certificate and i tried to get certificate through InstallCert.java , generating keystore with keytool etc. When i generate client from wsdl with axis2 wsdl2java it generates client but gives port 443 error at the end of generate process. when i test the service via web service explorer in eclipse i am getting javax.net.ssl.SSLHandshakeException sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target error. I also checked this error but i can't find solution.

Can anyone tell me please how should i generate client in eclipse apache tomcat with jdk 1.6, what is the difference between normal client.

DayaMoon

First of all, the URL endpoint should be httpS not http and make your truststore/keystore available to JVM.

see: http://blog.technogemsinc.com/2008/02/https-connection-in-java.html

I used also https://code.google.com/p/misc-utils/wiki/JavaHttpsUrl about an year ago..

Use what is more convenient to you from the below two options

  1. Make truststore available to jvm

    -Djavax.net.ssl.trustStore="<%PATH_TO_TRUST_STORE%>\testkeys"

  2. Tell your Java/socket factory to use this "trust store":

    System.setProperty( "javax.net.ssl.trustStore", "keystore_file" );

    System.setProperty( "javax.net.ssl.trustStorePassword", "somepass" );

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Add Self Signed Certificate without promting Yes/No from User

Accept server's self-signed ssl certificate in Java client

Java ssl/https client using a self-signed certificate

Can I create self-signed certificate in Java which will be automatically trusted by web browsers?

Chef remote_file from https site with self signed certificate

Advanced Rest Client Desktop App Self Signed Certificate issue

Java Rest Client using self-signed Certificate

Self Signed Certificate for localhost

Connect to websocket with self-signed certificate in java

ktor client https request with self-signed certificate

Generate web service client secure policy from .wsdl for java

Progresive Web App Service Worker with Self Signed Certificate

ASP.NET Core Web API client does not trust self-signed certificate used by the Identity Server instance

InternetOpenUrl with self signed certificate

Self signed key certificate

Wget or curl a self-signed certificate from server

Embedding from a site that uses a self-signed SSL certificate

Self Signed Certificate - Can't access relative links from client

How to use feh to open web image with self-signed certificate

Using a self signed SSL certificate just for a web service

Self Signed Certificate in Android

Self-signed certificate security for private server/client

Alternative to CertandKeygen for self signed certificate generation in java

TLS-secured TCP server and client with self-signed certificate

Self-Signed Certificate for Node Web Server inside Electron

SequelizeConnectionError: self signed certificate

Client certificate - shall I use self-signed or CA issued?

Setup Java MQTT client with Mosquitto over SSL with a self signed certificate

mosquitto broker with ssl LetsEncrypt certificate and self signed client certificate