Hi
I'm not sure exactly what to advise, perhaps if you can clarify what exactly
you need to test then it may help....
So perhaps you'd like to register a mock Jetty handler which says extends
org.mortbay.jetty.servlet.SessionHandler ?
If so then you can get a DestinationFactoryManager extension from the bus and then
get a DestinationFactory for say an id "
http://cxf.apache.org/bindings/xformat
"
and cast it to JettyHttpTransportFactory and get JettyDestination from it using an EndpointInfo which you can get from the Service
which JAXRsServerFactoryBean created....Finally, you you can get a list of Jetty Handlers from the destination and add a mock
handler to the list...
Or may be you can add a custom JAXRS invoker to the JAXRsServerFactoryBean, before creating a service ? And intercept the call there
?
cheers, Sergey
On Tue, Dec 01, 2009 at 05:50:20PM -0000, Sergey Beryozkin wrote:
Hi
You'll probably need to set up an appropriate Jetty handler using
httpj:handler, ex :
<httpj:engine-factory bus="cxf" id="jetty-factory">
<httpj:engine port="8009">
<httpj:handlers>
<bean class="org.mortbay.jetty.servlet.SessionHandler">
<!-- configure it -->
</bean>
<bean class="org.mortbay.jetty.handler.DefaultHandler"/>
</httpj:handlers>
</httpj:engine>
</httpj:engine-factory>
Actually, you can probably just set a sessionSupport attribute to true :
http://cwiki.apache.org/CXF20DOC/jetty-configuration.html
let us know please if it helps
cheers, Sergey
Hello, Sergey!
I guess that will help, but my goal is omit configuring everything using
Spring at this stage. I want to use some mock beans to be used with the
endpoint, and setup them in init method of my tests. So I will really prefer
to configure Jetty from Java, if that is possible.
Thank you for quick and prompt response!
--
Eugene N Dzhurinsky