You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by myerscb <my...@upmc.edu> on 2011/06/13 14:53:00 UTC
Re: Customization of service list page
Hi,
has any one gotten anywhere with this? I am wanting to do the same thing
and was looking for examples on how to accomplish it.
Thanks,
Chris
--
View this message in context: http://cxf.547215.n5.nabble.com/Customization-of-service-list-page-tp2797089p4484233.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Customization of service list page
Posted by lynnifer58 <gr...@upmc.edu>.
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.
Re: Customization of service list page
Posted by Sergey Beryozkin <sb...@gmail.com>.
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
On Tue, Jun 14, 2011 at 3:34 PM, lynnifer58 <gr...@upmc.edu> wrote:
> I'm also trying to do as Sergey suggested above to customize the service list
> page.
>
> I'm using apache cxf 2.4.0 and I'm working on modifying the
> ServletController, but I'm not seeing a generateServiceList() or
> getServletDestinations() methods anymore in order to override them.
>
> Are there other classes/methods I should be using? Any examples would be
> most helpful!
>
> thanks,
> Lynn
>
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Customization-of-service-list-page-tp2797089p4488030.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
Re: Customization of service list page
Posted by lynnifer58 <gr...@upmc.edu>.
I'm also trying to do as Sergey suggested above to customize the service list
page.
I'm using apache cxf 2.4.0 and I'm working on modifying the
ServletController, but I'm not seeing a generateServiceList() or
getServletDestinations() methods anymore in order to override them.
Are there other classes/methods I should be using? Any examples would be
most helpful!
thanks,
Lynn
--
View this message in context: http://cxf.547215.n5.nabble.com/Customization-of-service-list-page-tp2797089p4488030.html
Sent from the cxf-user mailing list archive at Nabble.com.