Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Servlets Mapping isn't working #20

Open
ctoestreich opened this Issue · 1 comment

1 participant

@ctoestreich
Owner

All items configured under the node

/**
     * cxf.servlets
     * <p>
     * A map of Servlet Name -> Servlet Mapping Pattern. If multiple Cxf
     * servlets are required or a different mapping pattern is needed this
     * configuration allows that.
     */
    servlets = [
            CxfServlet: '/services/*'
    ]

are sharing the same servlet and services. Multiple defined endpoints all look the same and have same services due to the code

def doWithWebDescriptor = { xml ->
        WebDescriptorConfiguration wdc = new WebDescriptorConfiguration(xml)
        with wdc.configuredServlets()
    }

 lastServletDescriptor() + {
                    servlet {
                        'servlet-name'(name)
                        'servlet-class'('org.grails.cxf.servlet.GrailsCxfServlet')
                        'load-on-startup'(loadOnStartup)
                    }
                }

                lastServletMappingDescriptor() + {
                    'servlet-mapping' {
                        'servlet-name'(name)
                        'url-pattern'(pattern)
                    }
                }

The GrailsCxfServlet appears to be a singleton.

@ctoestreich ctoestreich was assigned
@ctoestreich
Owner

Based on some further research it appears that the servlets are sharing the application context and wiring all beans from all contexts. see http://cxf.547215.n5.nabble.com/separate-CXFServlet-for-private-API-s-td3261355.html for more discussion on this topic. Going to try a few of these things ?dsl? to get this working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.