1 Reply Latest reply on Apr 22, 2011 3:38 AM by java coder

    @WebContext jar hell confusion

    java coder Newbie

      I am working on a project that is not mine, and it deploys to a JBoss server 4.2.3.GA, which has JBossWS 3.1.1. I created a working EJB web service class in this project using JAX-WS annotations. I just learned that it is not secure by HTTPS. I believe @WebContext can do this, but I have struggled to make this annotation work.


      I saw that it belongs to "jbossws-spi.jar", which I think is in the lib directories of the server. Is it safe to copy it to my project? Is it the only jar that needs to be copied? Won't there be conflicts?


      I tried copying it to my project, and added the annotation @WebContext(transportGuarantee = "CONFIDENTIAL"), but the annotation had no effect. The WSDL file still showed the endpoint URL as "http://...". Any ideas why?


      EDIT: Shortened the question, it was too long.

        • 1. @WebContext jar hell confusion
          java coder Newbie

          I found my solution.


          I think the annotation did not work because of some jar conflict. Therefore I copied the "jbossws-spi.jar" to my project class path, but I did not build it into my compiled and deployed EAR. (I used an Apache Ant build script to do this.) Thus, my source code recognizes the @WebContext annotation, but the build application relies on the annotation's implementation stored in JBossWS in the server. Now I understand!


          @WebContext(transportGuarantee = "CONFIDENTIAL") put my web service in HTTPS. I hope this helps others who have the same confusion.