문제

My webservice has an REST endpoint URL like /myapp/admin/services. If I set org.apache.cxf.servlet.hide-service-list-page=false then my URL is hijacked by the CXF services list. This happens because the listings URL is relative in org.apache.cxf.transport.servlet.ServletController.

OK, fine, so I shouldn't have used the phrase "services" in my URL structure. Mea culpa. But now how do I fix this? I'd like to override the "/services" default in ServletController. I just need my container to invoke setServiceListRelativePath() on that class, but I can't figure out how. I imagine there's some magic Spring snippet to do this?

If it matters, I'm using CXF as bundled in the Talend Service Factory.

도움이 되었습니까?

해결책

(turning my comment above into an answer, and modernizing since TSF no longer exists)

Under Karaf, add the following to etc/org.apache.cxf.osgi.cfg: "org.apache.cxf.servlet.service-list-path=/desired/path"

다른 팁

You can try this in your web.xml to override the CXF service list path

<init-param>
  <param-name>service-list-path</param-name>
  <param-value>/*</param-value>
</init-param>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top