Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9211327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:16:10+00:00 2026-06-18T01:16:10+00:00

I need help creating a trusted connection with a web service using Axis2 and

  • 0

I need help creating a trusted connection with a web service using Axis2 and org.jsslutils.sslcontext.X509SSLContextFactory. I have a generated client cert from the web service’s admin console (client.p12). I also have grabbed the server’s public cert by going to the endpoint uri and exporting it to a file using the browser (pubserver.cer). I converted the client.p12 to a jks using keytool (mywsks.jks). I also imported pubserver.cer into the keystore. I’m very new to ssl. Do I need to import these certs into …/jre/lib/security/cacert or cacerts or trusted.libraries or can I just reference mywsks.jks? How do I set up my code for the server to trust me using X509SSLContextFactory? It appears to need a keyStore and a trustStore which I’m deriving from this example:

X509SSLContextFactory sslContextFactory = new X509SSLContextFactory( 
    keyStore, keyStorePassword, trustStore); 

I’m currently using this to create the keyStore and trustStore:

KeyStore keyStore = KeyStore.getInstance("JKS");     
String keyStoreFile = "mywsks.jks"; 
InputStream keyInput = new FileInputStream(keyStoreFile);
String keyStorePassword = "thepassword"; 
keyStore.load(keyInput, keyStorePassword.toCharArray());
keyInput.close();

String trustStoreFile = "/path/to/cacert"; 
KeyStore trustStore = KeyStore.getInstance("JKS");
keyInput = new FileInputStream(trustStoreFile);
String trustStorePassword = "thepassword";
trustStore.load(keyInput, trustStorePassword.toCharArray());
keyInput.close();

I’m getting the following error:

org.apache.axis2.AxisFault: sun.security.validator.ValidatorException: No trusted certificate found
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:16:11+00:00Added an answer on June 18, 2026 at 1:16 am
    1. Add your client certificate that is used for authenticate into web service into a keyStore(client.p12).
    2. Add the server’s public key(pubserver.cer) into your trustStore. It can be /jre/lib/security/cacert

    Could you post what issue you are facing ? Because according to me, it is a confusing and a big topic to discuss..

    This example will help you implementing this..

    http://code.google.com/p/jsslutils/wiki/ApacheHttpClientUsage

    And finally you could make an URL connection..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pretty basic blog app on rails, and I need help creating
I need help creating SqlAlchemy query. I'm doing a Flask project where I'm using
I'm new in rails and need some help creating a Nested form. I have
I need some help creating a query for my mySQL database. I have recently
I need some help in creating report using iReport for this layout. I am
I have an advanced query/report that I need help creating in Access 2007. The
I need help creating the relationship in entity framework as everything I have tried
I need help in creating a query for my database. I have 2 tables,
i need help in creating skip rules i have array of 15rows,need to skip
I need help creating the best possible regular expression for this problem. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.