Thanks Freeman - as far as DOSGi is concerned, the configuration you
listed and having DOSGi endpoints registered with HTTP service will do,
the question which is open is how to get DOSGi clients picking up the
info they will need when auto-discovering that the endpoint is available
at HTTPS address.
IMHO, we may need to introduce a property, WSS4J style, say
ws.https.properties=https.properties
rs.https.properties=https.properties
where https.properties will list all what is needed to get HTTPS
connection established
Cheers, Sergey
On 12/12/12 01:34, Freeman Fang wrote:
If wanna use https with OSGi HTTPService from pax-web, just edit
etc/org.ops4j.pax.web.cfg, this is how it works in Karaf/Servicemix
have something like
org.osgi.service.http.secure.enabled=true
org.osgi.service.http.port.secure=8183
org.ops4j.pax.web.ssl.keystore=certs/myKeystore.jks
org.ops4j.pax.web.ssl.keystore.type=JKS
org.ops4j.pax.web.ssl.password=myPassword
org.ops4j.pax.web.ssl.keypassword=myPassword
org.ops4j.pax.web.ssl.clientauthwanted=false
org.ops4j.pax.web.ssl.clientauthneeded=false
Freeman
-------------
Freeman(Yue) Fang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋
On 2012-12-12, at 上午12:26, Sergey Beryozkin wrote:
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
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com