You are here: Home
Creating Classes From WSDLs With Non-Public Certificates PDF Print E-mail
Written by Josh B   
Friday, 16 July 2010 11:17

Tags: java

As part of my role in the $BIG_MEGA_CORP that I am currently working at, I have to deal with other companies API's. These often come in the form of SOAP services. These are often accessed via the various wonders of WSDL's. These days its quite easy to generate Jars of Classes via Maven. However, occasionally there are problems.

One problem I hit was the following Exception while creating such a jar with "mvn -Dmaven.test.skip clean package":

WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema):  faultCode=OTHER_ERROR: 
An error occurred trying to resolve schema referenced at
'https://securityservices.adcenterapi.microsoft.com/Api/SecureDataManagement/v7/SecureDataManagementService.svc?xsd=xsd3',
relative to 'file:/SecureDataManagementService.wsdl'.: sun.security.validator.ValidatorException: PKIX path
validation failed: java.security.cert.CertPathValidatorException: signature check failed

 

1. Go to the location where you want to access to, eg : https://securityservices.adcenterapi.microsoft.com/Api/SecureDataManagement/v7/SecureDataManagementService.svc?xsd=xsd3

2. Click on the Padlock icon.

3. Should now see details about the Certs being used for this webpage.

4. Export both the Microsoft Internet Authority and the Certificate Export Wizard password. Call them obvious names.

5. Use the following command to import them:

sudo keytool -import -alias MiMSFT_IA_Prod -file MicrosoftSecureServerAuthority.cert   -keystore $JAVA_HOME/jre/lib/security/cacerts

sudo keytool -import -alias MSFT_SSA_Prod -file MicrosoftSecureServerAuthority.cert   -keystore $JAVA_HOME/JDK/jre/lib/security/cacerts

The password for the Keystore is "changeit". On OS X it's "changeme". See : http://mediakey.dk/~cc/java-default-keystore-password-cacerts/

You should now be able to create the required classes...!

Last Updated on Friday, 16 July 2010 10:30
 

Add comment


Security code
Refresh

Joomla! Template by Red Evolution - Joomla Web Design