I need to be able to enable and disable ssl jetty configuration in a same port for a CXF service. Is there a way to do that using a property in a configuration file ?
What I'm doing now is able to specify which port will be configured for ssl and select the same port on the endpoint if I want to use ssl or use a different port if I don't want to have ssl. But I don't like the idea of having jett listening in a port that in not being used. I would prefer a more elegant solution if possible.
<jaxws:endpoint id="decisionService" implementor="#decisionImpl"
<sec:keyStore type="JKS" password="nnewserver"
<sec:keyStore type="JKS" password="nnewtrust"
<!-- these filters ensure that a ciphersuite with
export-suitable or null encryption is used,
but exclude anonymous Diffie-Hellman key change as
this is vulnerable to man-in-the-middle attacks -->
<!-- element to specify mutual (client) authentication -->
<sec:clientAuthentication want="true" required="true"/>
You cannot dynamically change the same port to be used for SSL and non-SSL traffic. You would need to reconfigure your application for using SSL or non-SSL and redeploy it.
So either declare two ports in your WSDL (one for SSL, one for non-SSL) or reconfigure and redeploy your application as necessary.