1 Reply Latest reply on Dec 15, 2014 7:39 AM by marco.rietveld

    How to register two ports (plain text, SSL) on the same URL with different protocols?

    marco.rietveld

      Hi all,

       

      (My setup is jbossws-cxf, no spring, no blueprint, just EE or POJO's).

       

      Is it possible to register a non-SSL ("normal") and SSL-configured port on the same URL with different protocols? For example:

       

      http://localhost:8080/ws/Pingservice

      https://localhost:8080/ws/Pingservice

       

      (Note the s in https). I've set up a test project to try to figure this out: here's my WSDL:

      https://github.com/mrietveld/scratch/blob/master/scratch-ws/scratch-ws-wsdl/src/main/resources/wsdl/PingService.wsdl#L133

       

      You'll notice that the service element contains 2 ports: 1 port uses the #UnsecureTransportPolicy and 1 uses the #SslTransportPolicy.

      In the code itself, (it's a WSDL/contract-first approach), I've just ended up defining 2 implementations that extend the abstract class with the real code:

      https://github.com/mrietveld/scratch/tree/master/scratch-ws/scratch-ws-wsdl/src/main/java/org/scratch/ws

       

      What's weird (or rather, logical but frustrating) is that I of course can not register two different ports on the same URL: I have to give them different URLS:

      https://github.com/mrietveld/scratch/blob/master/scratch-ws/scratch-ws-wars/src/main/eap-6_3/WEB-INF/web.xml

       

      So, to reiterate and summarize my question:

      1. Is it possible to register two different ports (one with SSL, one without) on the same URL with different protocols?

      2. If so, how do I do it on EAP 6.3 or Wildfly 8.1?

       

       

      Thanks!

      Marco