Actually, it should work in you use the connector in the CXF endpoint URL.

I mean:
1/ by default, CXF uses a single servlet, and the endpoints register on this servlet if you use relative URL in the endpoint (/myservice for instance). 2/ instead of relative URL, you can use an absolute URL: http://0.0.0.0:9090/myservice, where 9090 match the port defined in the jetty.xml (for the connector). In that case, CXF will try to create the connector or use the existing connector and bypass the "main" CXF servlet.

I think it should work.

Regards
JB

On 09/17/2014 12:00 PM, Srikanth Hugar wrote:
Sure. Thank you for your support.
Meanwhile i will investigate the other option if possible.

Let me know if anything could be done from my side. I am happy yo
contribute.

On Wed, Sep 17, 2014 at 3:25 PM, Achim Nierbeck <[email protected]
<mailto:[email protected]>> wrote:

    hi,

    no that won't work anymore. The issue right now is, that CXF does
    register a single servlet for communication where all of your CXF
    services are bound to. Unless there is another way of registering
    multiple CXF servlets I don't think that will work.

    I could investigate this a bit but right now my schedule is kind of
    tight so that might take at least 2 weeks before I could start this.

    Sorry not much else I can help with.

    regards, Achim

    2014-09-17 11:50 GMT+02:00 Srikanth Hugar <[email protected]
    <mailto:[email protected]>>:

        oh ok. But if i package cxf inside war, will it be accessible
        from both URLS? I mean /css/logger and /logger/logger ?
        according to my configuration.
        Because of default servlet
        *org.apache.cxf.osgi.cfg*
        org.apache.cxf.servlet.context=/css
        org.apache.cxf.servlet.name
        <http://org.apache.cxf.servlet.name/>=CSSService

        On Wed, Sep 17, 2014 at 3:12 PM, Achim Nierbeck
        <[email protected] <mailto:[email protected]>> wrote:

            Ok so the cxf servlet is generated from the cxf-bundle
            outside your WAB, in that case it doesn't work as the cxf
            servlet that does all of the cxf dispatching is available
            for all connectors.

            For your use case you need to  make sure there are CXF
            servlets available for every WAB. So it's best to include
            the cxf bundles inside your war so you have control of it.
            Right now CXF itself doesn't support this, as this is a
            special feature only available with Pax Web.

            regards, Achim

            2014-09-17 11:39 GMT+02:00 Srikanth Hugar
            <[email protected] <mailto:[email protected]>>:

                I am using cxf from outside bundle and Bundle-ClassPath
                does not contain cxf jar.

                Bundle-ClassPath: .,WEB-INF/classes

                Import-Package:
                META-INF.cxf;version="[2.7,3)",META-INF.cxf.osgi;versi
                  on="[2.7,3)",............,javax.ws.rs
                <http://javax.ws.rs>;version="[2.0,3)",javax.ws.rs.core;v
                  
ersion="[2.0,3)",org.apache.cxf.bus.spring;version="[2.7,3)",org.apac
                  
he.cxf.jaxrs;version="[2.7,3)",org.apache.cxf.jaxrs.spring;version="[
                  
2.7,3)",org.apache.cxf.transport.servlet;version="[2.7,3)",org.codeha
                  
us.jackson.jaxrs,org.slf4j;version="[1.7,2)",org.springframework.osgi
                  
.web.context.support,org.springframework.web.context,org.springframew
                  ork.web.context.request,org.springframework.web.filter
                Bundle-SymbolicName: logger-rest-service

                On Wed, Sep 17, 2014 at 3:00 PM, Achim Nierbeck
                <[email protected]
                <mailto:[email protected]>> wrote:

                    Is this a WAB that includes CXF, or are you re-using
                    cxf from an outside bundle.
                    Or better, does your Bundle-ClassPath for the WAB
                    contain a cxf jar?
                    Cause if it is the centralized cxf-bundle that one
                    does use all connectors available.

                    regards, Achim

                    2014-09-17 11:26 GMT+02:00 Srikanth Hugar
                    <[email protected]
                    <mailto:[email protected]>>:

                        Hello,

                            I  have a problem running WAB with specific
                        connector. I have 2 connectors in jetty.xml with
                        names *https-user(8081)* and *https-admin(9081)*.

                        *context file*
                        <cxf:bus>
                        <cxf:features>
                        <cxf:logging />
                        </cxf:features>
                        </cxf:bus>

                        <jaxrs:server id="services" address="/logger">

                        ........................


                        *MANIFEST.MF*

                        Web-Connectors: https-admin
                        Created-By: Apache Maven Bundle Plugin
                        Web-ContextPath: logger
                        Web-VirtualHosts: localhost
                        Build-Jdk: 1.7.0_45
                        Bundle-Version: 1.0.0.SNAPSHOT
                        Bnd-LastModified: 1410945232372

                        --------------------------------------------

                        *org.apache.cxf.osgi.cfg*
                        org.apache.cxf.servlet.context=/css
                        org.apache.cxf.servlet.name
                        <http://org.apache.cxf.servlet.name>=CSSService


                        *org.ops4j.pax.web.cfg*
                        
org.ops4j.pax.web.config.file=${karaf.home}/etc/jetty.xml
                        org.osgi.service.http.secure.enabled=true

                        According to my understanding service should be
                        running with only port *9081*, but service is
                        accessible from both ports.

                        What could be the issue here?
                        --
                          Srikanth
                        www. <http://www.srikanthugar.in>gharki.com
                        <http://gharki.com>




                    --

                    Apache Member
                    Apache Karaf <http://karaf.apache.org/> Committer & PMC
                    OPS4J Pax Web
                    <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
                    Committer & Project Lead
                    blog <http://notizblog.nierbeck.de/>

                    Software Architect / Project Manager / Scrum Master




                --
                  Srikanth
                www.srikanthugar.in <http://www.srikanthugar.in>




            --

            Apache Member
            Apache Karaf <http://karaf.apache.org/> Committer & PMC
            OPS4J Pax Web
            <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
            Project Lead
            blog <http://notizblog.nierbeck.de/>

            Software Architect / Project Manager / Scrum Master




        --
          Srikanth
        www.srikanthugar.in <http://www.srikanthugar.in>




    --

    Apache Member
    Apache Karaf <http://karaf.apache.org/> Committer & PMC
    OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
    Committer & Project Lead
    blog <http://notizblog.nierbeck.de/>

    Software Architect / Project Manager / Scrum Master




--
  Srikanth
www.srikanthugar.in <http://www.srikanthugar.in>


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to