6 Replies Latest reply on Sep 27, 2010 7:53 PM by klimperos

    CXF jaxrs example

    klimperos

      Hi,

       

      I followed the advice in the ServiceMix 4.2.0's CXF JAXRS example README and was able to change the servlet path by setting the org.apache.cxf.servlet.context property in org.apache.cxf.osgi.cfg.

       

      However, I also want to change the default port from 8181.

      The proposed remedy I found was to alter the /etc/system.properties file, as shown:

       

      \# Default port for the OSGI HTTP Service

      org.osgi.service.http.port=9090

       

      After restarting the server and reinstalling the example, the server is still listening on port 8181.

       

      After searching through documentation for a few hours, I have not found any further information on changing the port. Any ideas would be appreciated.

       

      Thank you.

       

      Kevin Limperos

        • 1. Re: CXF jaxrs example
          ffang

          Hi,

           

          You can edit $SMX_HOME/system/org/apache/felix/karaf/apache-felix-karaf/1.4.0/apache-felix-karaf-1.4.0-features.xml

           

          edit org.osgi.service.http.port in http feature.

           

          Freeman

          • 2. Re: CXF jaxrs example
            klimperos

            Thank you, Freeman - it worked.

             

            Is there some documentation that I should/could read that would have led me to this solution? Eventually, I'll want to activate SSL, digest authentication, and role-based access. Where might I find examples and instructions for activating these in FUSE/CXF? (They seem to exist for standalone CXF, but I've not found advice for Jetty configuration with FUSE, per se.)

             

            Cheers,

            Kevin

             

            Edited by: klimperos on Sep 12, 2010 8:22 PM

            • 3. Re: CXF jaxrs example
              mgharbi

              Hi,

               

              I am also searching for help about SSL, digest authentication, and role-based access and how to activate these in FUSE/CXF?

               

              Thanks for your help.

               

              Mohsen

              • 4. Re: CXF jaxrs example
                ffang

                Hi,

                 

                For advanced jetty configuration, take a look at , this should help.

                 

                http://wiki.ops4j.org/display/paxweb/AdvancedJettyConfiguration

                 

                Freeman

                • 5. Re: CXF jaxrs example
                  klimperos

                  The jetty advanced config has information on creating a bundle fragment, but it's not clear where I can place a web.xml that works in conjunction with the jetty.xml.

                   

                  I'd like to create <security-constraint>, <login-config>, and <security-role> tags to secure my JAX-RS resources.

                   

                  Any suggestions on how to do this? I have scoured through a lot of online documents, but the closest thing I can find is configuring CXF standalone, not with a FUSE/ServiceMix bundle.

                   

                  Thank you.

                   

                  Kevin Limperos

                  • 6. Re: CXF jaxrs example
                    klimperos

                    Follow-up question on securing JAX-RS resources with CXF/ServiceMix.