views:

519

answers:

1

I have a customer SecureSocketFactory set to be used by Axis when making an https connection using the following property: AxisProperties.setProperty("axis.socketSecureFactory", "com.metavante.csp.model.manager.mobilepayments.MonitiseSSLSocketFactory");

When this class is instantiated by Axis the constructor with a Hashtable (attributes) is called. I see the timeout attribute is set in this table. Is there anyway to set more values in this? I would like to be able to configure the Socket Factory on a per-instance scenario instead of globally by using static or system properties. Thank you.

Edit: I found out these attributes are actually the HttpSender (BasicHandler) options. I still am unable to set these dynamically though.

A: 

I figured out a way around the problem. In my code where I wanted to set the property I use: serviceLocator.getEngine().setOption(USE_CERT_PROPERTY, new Boolean(true));

where getEngine returns the AxisEngine in use. Then in the socket factory I can:

Boolean useSMS = (Boolean) MessageContext.getCurrentContext().getProperty(OtherClass.USE_CERT_PROPERTY);

I could set the object to whatever, maybe I'll go with the certificate name I needed. Hope this helps someone.

Adam