You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Vipul Sagare <vi...@yahoo.com> on 2005/12/13 00:18:05 UTC
create method in Custom SocketFactory in AXIS 1.3
How should the host for following method be configured and where? (FYI Our implementation is in clustered environment (weblogic). )
Also, Per axis users guide, I will be configuring CustomFactory as VM attribute
-Dorg.apache.axis.components.net.SocketFactory=your.package.YourSocketFactory
Any issues/problems/ with this approach? (I am still not clear how the following method gets its parameters).
Your help is appreciated.
Vipul
public Socket create(String host,
int port,
StringBuffer otherHeaders,
BooleanHolder useFullURL) throws Exception {
SSLContext sslCtx = SSLContext.getInstance("SSL");
// KeyManager keyM = new KeyManager();
// sslCtx.init(KeyManager,TrustManager, null);
int _port = 443;// port
String hostname = host;
SSLSocketFactory socketFactory = sslCtx.getSocketFactory();
SSLSocket theSocket = (SSLSocket)
socketFactory.createSocket(hostname,_port);
return theSocket;
}