Hi
I got "javax.net.ssl.SSLKeyException:" error when I try to do authentication through JDeveloper. Thanks in advance for any suggestions.
My code snap is
public void AuthenticateUser() {
try { // Call Web Service Operation
// Create XOA Service Object and Port (NOTE: This is from the PGiConnect Web Service imported
// as a WebService Reference
System.setProperty("javax.net.ssl.trustStore", "C:\\Oracle\\Middleware_11.1.1.4\\jdk160_21\\jre\\lib\\security\\cacerts");
System.out.println("in sms authentication");
com.premiereconnect.premconn._2007._02.XOA service = new com.premiereconnect.premconn._2007._02.XOA();
com.premiereconnect.premconn._2007._02.XOASOAPPort port = service.getXOAPort();
// Need to Adjust the Submit URL becuase the one listed in the WSDL Port Binding
// is not a valid reference. The WSDL uses xoa.xpedite.com however this is not a valid
// submit URL a valid one isn't posted becuase PGiConnect has several valid submit URL's
BindingProvider bp = (BindingProvider)port;
String address = (String)bp.getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
address = SetURL(); // Set URL returns a string value of the submit URL
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address);
// Setup XDDSAuth object
com.premiereconnect.premconn._2007._02.XDDSAuthType XDDSAuth = new com.premiereconnect.premconn._2007._02.XDDSAuthType();
// XDDSAuth.setPassword(jTextPASS.getText()); // GetPassword from textbox
//XDDSAuth.setRequesterID(jTextUSER.getText()); // GetUser from textbox
XDDSAuth.setPassword("7827692956");
XDDSAuth.setRequesterID("1925730");
// Setup and Assign Authentication Object
com.premiereconnect.premconn._2007._02.Authentication Auth = new com.premiereconnect.premconn._2007._02.Authentication();
Auth.setXDDSAuth(XDDSAuth);
// Initialize WebService objects
com.premiereconnect.premconn._2007._02.AuthenticateRequest parameter = new com.premiereconnect.premconn._2007._02.AuthenticateRequest();
com.premiereconnect.premconn._2007._02.Request requestHeader = new com.premiereconnect.premconn._2007._02.Request();
javax.xml.ws.Holder<com.premiereconnect.premconn._2007._02.AuthenticateResult> parameter0 = new javax.xml.ws.Holder<com.premiereconnect.premconn._2007._02.AuthenticateResult>();
javax.xml.ws.Holder<com.premiereconnect.premconn._2007._02.Response> responseHeader = new javax.xml.ws.Holder<com.premiereconnect.premconn._2007._02.Response>();
// Set Header Tags
requestHeader.setAuthentication(Auth); // Authentication in Header
requestHeader.setReceiverKey(SetURL()); // Receiver Key in Header
// Make Authenticate Call to PGiConnect
port.authenticate(parameter, requestHeader, parameter0, responseHeader);
// Check Status code of the result
int StatusCode = parameter0.value.getStatus().getStatusCode().intValue();
System.out.println("authenticate status code =" + StatusCode);
if ( StatusCode == 0) {
// StatusCode 0 = Authenticate Successful
System.out.println( "Authenticate Successful!!!");
}
else
{
// Authenticate Error (Display error in MsgBox)
String sError = parameter0.value.getStatus().getStatusCode().toString();
sError += "\n" + parameter0.value.getStatus().getStatusMessage();
System.out.println("not authenticate message =" + sError);
}
} catch (Exception ex) {
// TODO handle custom exceptions here
System.out.print("at exception : " + ex.getMessage());
}
}
the error message is:
<Oct 19, 2011 11:10:13 AM PDT> <Warning> <Security> <BEA-090504> <Certificate chain received from api.pgiconnect.com - 137.236.223.105 failed hostname verification check. Certificate contained messaging.easylink.com but check expected api.pgiconnect.com>
<Oct 19, 2011 11:10:14 AM PDT> <Warning> <Security> <BEA-090504> <Certificate chain received from api.pgiconnect.com - 137.236.223.105 failed hostname verification check. Certificate contained messaging.easylink.com but check expected api.pgiconnect.com>
<Oct 19, 2011 11:10:14 AM PDT> <Warning> <Security> <BEA-090504> <Certificate chain received from api.pgiconnect.com - 137.236.223.105 failed hostname verification check. Certificate contained messaging.easylink.com but check expected api.pgiconnect.com>
<Oct 19, 2011 11:10:15 AM PDT> <Warning> <Security> <BEA-090504> <Certificate chain received from api.pgiconnect.com - 137.236.223.105 failed hostname verification check. Certificate contained messaging.easylink.com but check expected api.pgiconnect.com>
<Oct 19, 2011 11:10:15 AM PDT> <Warning> <Security> <BEA-090504> <Certificate chain received from api.pgiconnect.com - 137.236.223.105 failed hostname verification check. Certificate contained messaging.easylink.com but check expected api.pgiconnect.com>
at exception : javax.net.ssl.SSLKeyException: [Security:090504]Certificate chain received from api.pgiconnect.com - 137.236.223.105 failed hostname verification check. Certificate contained messaging.easylink.com but check expected api.pgiconnect.comdone call sms