Domanda

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.

È stato utile?

Soluzione

(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"

Altri suggerimenti

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>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top