Yes, please use Karaf based OSGi container if you want to use CXF with OSGi, 
loads of work has been done to enable CXF to work in OSGi smoothly. 

Cheers
-------------
Freeman(Yue) Fang

Red Hat, Inc. 





> On Aug 14, 2019, at 9:12 AM, Colm O hEigeartaigh <[email protected]> wrote:
> 
> Hi,
> 
> Answers inline.
> 
> On Wed, Aug 14, 2019 at 12:43 PM Fr Jeremy Krieg 
> <[email protected] <mailto:[email protected]>> 
> wrote:
> 1.       Try and install the OpenSAML library. This is non-trivial because a) 
> it doesn’t appear to have been bundled for OSGi and I would need to do that 
> manually, and b) it also seems to have a high dependency fanout of its own.
> 
> 
> May I ask how you are deploying it as an OSGi bundle? In CXF, we have a set 
> of features for Apache Karaf that handles all of the OSGi requirements for 
> WSS4J:
> 
> https://github.com/apache/cxf/blob/e6d432be93022b5b4ac1998a546d0652861fdff3/osgi/karaf/features/src/main/resources/features.xml#L61
>  
> <https://github.com/apache/cxf/blob/e6d432be93022b5b4ac1998a546d0652861fdff3/osgi/karaf/features/src/main/resources/features.xml#L61>
> 
> So if you are deploying to Karaf, you can just re-use the CXF features. Note 
> that it uses a ServiceMix bundle for OpenSAML which makes OpenSAML work in 
> OSGi:
> 
> <bundle start-level="25" 
> dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml/${cxf.opensaml.osgi.version}</bundle>
>  
> 2.       Re-write cxf-rt-ws-security’s manifest to declare the dependency on 
> OpenSAML to be optional.
> 
> 
> I'm not sure what the ramifications are of making OpenSAML optional for OSGi 
> in CXF - so I would be pretty wary of doing that.
> 
> Colm.
>  
> 
>  
> 
> At this stage, I’d like to implement the second option because I started 
> trying the first and found OpenSAML’s own dependency fanout to be an issue. 
> Also, although I don’t 100% understand what OpenSAML is (or 100% understand 
> web services for that matter), it seems to me that if your web service isn’t 
> using SAML, then it is unnecessary to have Open SAML on your classpath at all.
> 
>  
> 
> Are there any seasoned CXF users out there that can comment on whether this 
> is a problem?
> 
>  
> 
> If it is not a problem taking OpenSAML off of the classpath, perhaps the next 
> question should be asked: should the manifest for cxf-rt-ws-security be 
> changed to make the opensaml dependencies optional?
> 
>  
> 
> Blessings,
> 
> <image002.png>Fr Jeremy Krieg
> 
> Chief Executive Officer
> 
>  
> 
> Greek Welfare Centre SA
> 
> St Philothei
> 
> Greek Orthodox Archdiocese of Australia
> 
>  
> 
> 213 Henley Beach Road
> 
> TORRENSVILLE SA 5031
> 
> Phone: (08) 8212 5100
> 
> [email protected] <mailto:[email protected]>
> www.greekwelfaresa.org.au <http://www.greekwelfaresa.org.au/>
>  
> 
> 
> 
> -- 
> Colm O hEigeartaigh
> 
> Talend Community Coder
> http://coders.talend.com <http://coders.talend.com/>

Reply via email to