Hi
On 11/12/12 15:51, zi'an mu wrote:
I use the cxf-dosgi-ri-singlebundle-distribution to provider a
webservice.following the simple(like spring_dm and greeter_rest),I aleady
publish a helloworld serviece.here is my service config file.

<osgi:service interface="com.helloworld.dosgi.service.IHelloWorldService">
     <osgi:service-properties>
       <entry key="service.exported.interfaces" value="*" />
       <entry key="service.exported.configs" value="org.apache.cxf.rs" />
       <entry key="service.exported.intents" value="HTTP" />
       <entry key="org.apache.cxf.rs.address" value="
http://localhost:9000/services"; />
     </osgi:service-properties>

     <bean class="com.helloworld.dosgi.service.impl.HelloWorldServiceImpl" />
   </osgi:service>

now I want to use https for my demo service.
So I think if I can config Jetty runtime used for the CXF, and then I just
need to modify the  "org.apache.cxf.rs.address" to "https://xxxxx";. Is it
right?
if it is right,how to add the config file into my project? I read the doc (
http://cxf.apache.org/docs/jetty-configuration.html) and the demo
(wsdl_first_https),but they are not helpful for the osgi environment.

On the server side, you can set "org.apache.cxf.rs.address" to a relative value, say "/rs" and that (as Christian explained to me) will be linked to CXF Servlet Transport which is bound to OSGI HTTPService, the full address will be

"https://localhost:9000/cxf/rs";, where 'cxf' segment can be customized.

or use

"org.apache.cxf.rs.http.context" property instead - the only issue is that it does not work with the singlebundle distro at the moment. Using the multibundle one will be better

Not sure how to do things the DOSGI way on the client side though, in order to get HTTPS wired in ? This can be done with CXF outside of DOSgi, but not sure about DOSGi...

Christian, how would we do it :-) ?

Cheers, Sergey

Reply via email to