I am really stuck here.
I have tried to configure jetty in the bundle context file as follows but I don't know how to set 'resourceBase' property:
I would like to be able to give jetty the location of my crossdomain.xml file in my bundle (e.g. classpath:META-INF/crossdomain.xml)
Here's one way to do it that I think should work ..
1) Grab the attached jetty.xml file and set it to listen on the same port as your webservice
2) Create a directory called '/deploy directory
Jetty should come up on the configured port and expose the files in that directory.
jetty.xml 2.6 KB
Thanks so much Dave.
I am not able to test it right now (back to office next tuesday ) but it feels good. Anyway I'll keep you informed on whether it is a success or not next week.
Ok here is the status as I have some issues:
Dave, I've tried your solution. If I start ServiceMix, waiting for my web services to be ready and then if I copy the jetty.xml file into the 'deploy' folder I can successfully access the crossdomain.xml file at for e.g. http://localhost:9090/crossdomain.xml. The big issue is: I then cannot access the web service listening on port 9090 (it was possible just before deploying jetty.xml).
It seems it is not possible to have several jetty configurations on a same port: the last deployed configuration "wins". If I uninstall the jetty bundle I am again able to access the web service.
I have also tried to start ServiceMix with the jetty.xml file already in place in the 'deploy' folder but then I got an error in the log and the web service sharing the port number cannot be properly deployed.
I use camel-cxf for my Web Services.
Is this a known issue regarding jetty or camel?
Did this get resolved? I am also interested in a general/simple solution for serving crossdomain.xml out of an http-su or cxf-su for web services.
Well I resolved it by including the jetty declaration right into my bundle context. I had then to deal with some issue to be able to set the port number through configuration (have a look at http://fusesource.com/forums/thread.jspa?threadID=1256&tstart=0).
I was then forced to modify the jetty schema but, as Dan Kulp mentions it in the thread, the latest 2.2.x CXF snapshot should be able to directly accept configurable port number (several schemas have been modified).