I was able to get the service list customized with cxf 2.4.0 thanks to
Sergey's ideas.
Here are some steps I took:

created MyOwnCXFServlet that extends CXFServlet - contains
MyOWnServletController
created MyOwnServletController that extends ServletController  - contains
MyOwnServiceListGeneratorServlet
created MyOwnServiceListGeneratorServlet that extends HttpServlet 
created MyOwnFormattedServiceListWriter that extends
FormattedServiceListWriter

I only modifed the method method createServletController - changed to return
MyOwnServletController in MyOwnCXFServlet
other methods stayed the same.
- init()
- loadBus()
- createSpringContext(ApplicationContext ctx, ServletConfig sc, String
location)
- DestinationRegistry getDestinationRegistryFromBus(Bus bus) 
- invoke(HttpServletRequest request, HttpServletResponse response)

In MyOwnServletController, 
init() now is called on MyOwnSeviceListGeneratorServlet
invoke() now uses MyOwnServiceListGeneratorServlet

In MyOwnServiceListGeneratorServlet, I overroad the service() method to
create a new MyOwnFormattedServiceListWriter.

In MyOwnFormattedServiceListWriter, I overroad the writeServiceList() to
present the service list as I wanted.

Hope this helps anyone trying to do the same thing.  
Thanks,
Lynn




Re: Customization of service list page 
Jun 14, 2011; 12:02pm— by  Sergey Beryozkin-5 
Hi, 
I can see serviceListGenerator code has been hidden behind HttpServlet 
now, so not sure what to advise now. 
Default  serviceListGenerator servlet can not be extended, so perhaps 
the simplest option is to override 
ServletController.invoke, check if it's /services and if yes then 
handle it otherwise delegate to superclass? 

Cheers, Sergey 



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Customization-of-service-list-page-tp2797089p4529099.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to