|
Ok, I changed my code just a little bit and realized I needed https://could
instead of http:// that was in my code. I am now getting a SSL error
after doing that.
[INFO] HttpMethodDirector - I/O exception (javax.net.ssl.SSLException)
caught when processing request: The certificate container *SYYSTEM
not be accessed.could
[INFO] HttpMethodDirector - Retrying request
[INFO] HttpMethodDirector - I/O exception (javax.net.ssl.SSLException)
caught when processing request: The certificate container *SYYSTEM
not be accessed.could
[INFO] HttpMethodDirector - Retrying request
[INFO] HttpMethodDirector - I/O exception (javax.net.ssl.SSLException)
caught when processing request: The certificate container *SYYSTEM
not be accessed.be
[INFO] HttpMethodDirector - Retrying request
javax.net.ssl.SSLException: The certificate container *SYSTEM could not
accessed.com/ibm/as400/ibmonly/net/ssl/AuthContext.access$000(Lcom/ibm/as400/ibmonly/net/ssl/AuthContext;Ljava/lang/String;Ljava/lang/
java/lang/Throwable.<init>(Ljava/lang/String;)V+4
(Throwable.java:85)
java/lang/Exception.<init>(Ljava/lang/String;)V+1
(Exception.java:33)
java/io/IOException.<init>(Ljava/lang/String;)V+1
(IOException.java:38)
javax/net/ssl/SSLException.<init>(Ljava/lang/String;)V+1
(SSLException.java:43)
String;Ljava/lang/String;)V+1 (AuthContext.java:73)com/ibm/as400/ibmonly/net/ssl/AuthContext.getDefault()Lcom/ibm/as400/ibmonly/net/ssl/AuthContext;+6
com/ibm/as400/ibmonly/net/ssl/AuthContext$2.run()Ljava/lang/Object;+44
(AuthContext.java:119)
com/ibm/as400/ibmonly/net/ssl/AuthContext.<init>()V+12
(AuthContext.java:87)
(AuthContext.java:168)(Class.java:238)
com/ibm/as400/ibmonly/net/ssl/SSLSocketFactoryImpl.<init>()V+4
(SSLSocketFactoryImpl.java:70)
java/lang/Class.newInstance()Ljava/lang/Object;+14
org/apache/commons/httpclient/protocol/SSLProtocolSocketFactory.createSocket(Ljava/lang/String;ILjava/net/InetAddress;I)Ljava
javax/net/ssl/SSLSocketFactory.getDefault()Ljavax/net/SocketFactory;+127
(SSLSocketFactory.java:97)
javax/net/ssl/SSLSocketFactory.getDefault()Ljavax/net/SocketFactory;+127
(SSLSocketFactory.java:97)
/net/Socket;+0 (SSLProtocolSocketFactory.java:82)org/apache/commons/httpclient/protocol/SSLProtocolSocketFactory.createSocket(Ljava/lang/String;ILjava/net/InetAddress;ILorg/a
pache/commons/httpclient/params/HttpConnectionParams;)Ljava/net/Socket;+33
(SSLProtocolSocketFactory.java:127)org/apache/commons/httpclient/HttpMethodDirector.executeWithRetry(Lorg/apache/commons/httpclient/HttpMethod;)V+83
org/apache/commons/httpclient/HttpConnection.open()V+184
(HttpConnection.java:707)
(HttpMethodDirector.java:387)org/apache/commons/httpclient/HttpMethodDirector.executeMethod(Lorg/apache/commons/httpclient/HttpMethod;)V+288
(HttpMethodDirector.java:171)org/apache/commons/httpclient/HttpClient.executeMethod(Lorg/apache/commons/httpclient/HostConfiguration;Lorg/apache/commons/ht
tpclient/HttpMethod;Lorg/apache/commons/httpclient/HttpState;)I+114org/apache/commons/httpclient/HttpClient.executeMethod(Lorg/apache/commons/httpclient/HttpMethod;)I+14
(HttpClient.java:397)
(HttpClient.java:323)PolicyServlet.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+871
(PolicyServlet.java:144)javax/servlet/http/HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+136
(HttpServlet.java:760)javax/servlet/http/HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+25
(HttpServlet.java:8553)org/apache/tomcat/core/ServletWrapper.doService(Lorg/apache/tomcat/core/Request;Lorg/apache/tomcat/core/Response;)V+66
(ServletWrapper.java:405)org/apache/tomcat/core/Handler.service(Lorg/apache/tomcat/core/Request;Lorg/apache/tomcat/core/Response;)V+198
(Handler.java:287)org/apache/tomcat/core/ServletWrapper.service(Lorg/apache/tomcat/core/Request;Lorg/apache/tomcat/core/Response;)V+139
(ServletWrapper.java:372)org/apache/tomcat/core/ContextManager.internalService(Lorg/apache/tomcat/core/Request;Lorg/apache/tomcat/core/Response;)V+260
(ContextManager.java:806)org/apache/tomcat/core/ContextManager.service(Lorg/apache/tomcat/core/Request;Lorg/apache/tomcat/core/Response;)V+15
(ContextManager.java:752)org/apache/tomcat/service/connector/JNIConnectionHandler.processConnection(JJ)V+253
(JNIConnectionHandler.java:186)+
org/apache/tomcat/service/JNIEndpoint.service(JJ)I+13
(JNIEndpoint.java:176)
This is my code:
//Create an instance of HttpClient.
HttpClient client = new HttpClient();
// Create a method instance.
PostMethod post = new PostMethod(
"https://www.url.com/app/cgi-bin/test/nav.mac/service_link");
NameValuePair[] data = {
new NameValuePair("agent_id", username),
new NameValuePair("password", pwd),
new NameValuePair("poltyp", type),
new NameValuePair("polno", policy)
};
post.setRequestBody(data);
try {
client.executeMethod(post);
if (post.getStatusCode() == HttpStatus.
SC_OK) {
System.out
.println(post.getResponseBodyAsString());
} else {
System.out.println("Unexpected failure: "
post.getStatusLine().toString());
}
}
catch(HttpException e) {
e.printStackTrace();
}
catch(IOException e) {
e.printStackTrace();
}
finally {
post.releaseConnection();
}
I also checked the following directories and they have *RX access for
QTMHHTP1 or Public
/
/QIBM
/QIBM/UserData
/QIBM/UserData/ICSS
/QIBM/UserData/ICSS/Cert
/QIBM/UserData/ICSS/Cert/Server
and these directories have *RW for QTMHHTP1
/QIBM/UserData/ICSS/Cert/Server/DEFAULT.KDB
/QIBM/UserData/ICSS/Cert/Server/DEFAULT.RDB
Any help is greatly appreciated.
Thanks
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.