Isssue with overriding axisProperties - axis.socketSecureFactory

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Isssue with overriding axisProperties - axis.socketSecureFactory

bdurgaprakash
This post was updated on .
Hi,

I have requirement to set different axis.socketSecureFactory property based on some condition as mentioned below. But here problem is once it loads AxisStrictTrust then subequent calls if we have to set AxisBlindTrust then its not reflecting. Same thing vice versa.

Please help me to resolve this.

Example :
if (credentials.getTrustMode().equals(TrustMode.STRICT_TRUST))
                {
                    logger.debug("Using Strict trust for communication with {}", ipAddress);
                    AxisProperties.setProperty("axis.socketSecureFactory", "com.fc.common.service.AxisStrictTrust");
                }
                else
                {
                    logger.debug("Using Blind trust for communication with {}", ipAddress);
                    AxisProperties.setProperty("axis.socketSecureFactory", "com.fc.common.service.AxisBlindTrust");
                }