You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by yr <ya...@capgemini.com> on 2015/08/18 16:29:58 UTC

SMX5.5 CXF-osgi depedencies

Hello

I try to deploy a cxf-osgi service with depedencies defined in the Imported
Packages section in META-INF file. These depedencies will be also share with
others services

What is the best solution to add theses depedencies in SMX ?

Is it to copy all jar in SMX5.5_HOME/lib folder ?

Thanks



--
View this message in context: http://servicemix.396122.n5.nabble.com/SMX5-5-CXF-osgi-depedencies-tp5722888.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: SMX5.5 CXF-osgi depedencies

Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
Hi

Do you mean CXF Dosgi? If so you can use prepared features:

karaf@root> features:chooseurl cxf-dosgi <required_version>
Adding feature url mvn:org.apache.cxf.dosgi/cxf-dosgi/LATEST/xml/features

karaf@root> features:list | grep cxf-dosgi
[uninstalled] [1.8-SNAPSHOT    ] cxf-dosgi-base                          cxf-dosgi-1.8-SNAPSHOT    base libs needed outside karaf
[uninstalled] [1.8-SNAPSHOT    ] cxf-dosgi-core                          cxf-dosgi-1.8-SNAPSHOT   
[uninstalled] [1.8-SNAPSHOT    ] cxf-dosgi-discovery-local               cxf-dosgi-1.8-SNAPSHOT   
[uninstalled] [1.8-SNAPSHOT    ] cxf-dosgi-discovery-distributed         cxf-dosgi-1.8-SNAPSHOT   
[uninstalled] [0.0.0           ] cxf-dosgi-zookeeper-server              cxf-dosgi-1.8-SNAPSHOT

And now you can install all necessary features

karaf@root> features:install cxf-dosgi-core

Regards
Krzysztof



On 18.08.2015 16:29, yr wrote:
> Hello
>
> I try to deploy a cxf-osgi service with depedencies defined in the Imported
> Packages section in META-INF file. These depedencies will be also share with
> others services
>
> What is the best solution to add theses depedencies in SMX ?
>
> Is it to copy all jar in SMX5.5_HOME/lib folder ?
>
> Thanks
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/SMX5-5-CXF-osgi-depedencies-tp5722888.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

-- 
Krzysztof Sobkowiak (@ksobkowiak)

JEE & OSS Architect, Integration Architect
Apache Software Foundation <http://apache.org/> Member
V.P. Apache ServiceMix | Apache ServiceMix <http://servicemix.apache.org/> Committer & PMC Member
Senior Solution Architect @ Capgemini SSC <http://www.capgeminisoftware.pl/>

Re: SMX5.5 CXF-osgi depedencies

Posted by 이듀이 <de...@gmail.com>.
of course.
Exactly, Your Answer is correct.

When Cxf is installed, CXF is in need of dependency Jars.


In My Case,
Dev Server can access the internet,
But Operation Server didn't allowed to access the internet.
and I was installed CXF by hand.


in Other Case,
It have a problem with installing CXF.

Thank you for your answer


2015-08-20 15:37 GMT+09:00 Christian Schneider <ch...@die-schneider.net>:

>
>
> Am 20.08.2015 um 05:49 schrieb 이듀이:
>
>>   Second Step. add Install CXF ( if already have installed, pass it)
>>
>> if you use Karaf  or you don't find CXF  you should add Install CXF
>>
>> 1. copy feature.xml (apache-cxf-3.0.2-features.xml)  to system directory
>>
>>
>>  \system\org\apache\cxf\karaf\apache-cxf\3.0.2\apache-cxf-3.0.2-features.xml
>>
>> 2. copy jars ( cxf )  to system directory
>>
>>     system\org\apache\cxf\*
>>
>>
>> 3. edit etc/org.apache.karaf.features.cfg
>>
>> you must add features.xml at featuresRepositories
>> and must add feaures Name (cxf) at  featuresBoot
>>
>> You should not copy the dependencies by hand.
>
> If you do not mind that cxf is downloaded from the internet (or your local
> maven repo or nexus) then simply do this:
> feature:chooseurl cxf 3.0.2
> feature:install cxf-jaxws
>
> If you want everything to be self contained then create a custom karaf
> distribution like servicemix does.
> There you use maven and the karaf maven plugin to create a custom system
> dir that contains all necessary jars and feature files.
> Copying the files by hand would be extremely error prone.
>
> For example you described to copy only the org/apache/cxf jars. CXF neeeds
> a lot of jars outside that namespace though. So you would end with an
> inconsistent system where only
> parts of cxf dependencies are installed locally.
>
> Anyway I would not start with this part. When learning to work with smx or
> karaf it is good enough to install cxf using the command line. The self
> contained distribution is typically only relevant for production
> deployments.
>
> Christian
>
>

Re: SMX5.5 CXF-osgi depedencies

Posted by Christian Schneider <ch...@die-schneider.net>.

Am 20.08.2015 um 05:49 schrieb 이듀이:
>   
> Second Step. add Install CXF ( if already have installed, pass it)
>
> if you use Karaf  or you don't find CXF  you should add Install CXF
>
> 1. copy feature.xml (apache-cxf-3.0.2-features.xml)  to system directory
>
>    \system\org\apache\cxf\karaf\apache-cxf\3.0.2\apache-cxf-3.0.2-features.xml
>
> 2. copy jars ( cxf )  to system directory
>
>     system\org\apache\cxf\*
>
>
> 3. edit etc/org.apache.karaf.features.cfg
>
> you must add features.xml at featuresRepositories
> and must add feaures Name (cxf) at  featuresBoot
>
You should not copy the dependencies by hand.

If you do not mind that cxf is downloaded from the internet (or your 
local maven repo or nexus) then simply do this:
feature:chooseurl cxf 3.0.2
feature:install cxf-jaxws

If you want everything to be self contained then create a custom karaf 
distribution like servicemix does.
There you use maven and the karaf maven plugin to create a custom system 
dir that contains all necessary jars and feature files.
Copying the files by hand would be extremely error prone.

For example you described to copy only the org/apache/cxf jars. CXF 
neeeds a lot of jars outside that namespace though. So you would end 
with an inconsistent system where only
parts of cxf dependencies are installed locally.

Anyway I would not start with this part. When learning to work with smx 
or karaf it is good enough to install cxf using the command line. The 
self contained distribution is typically only relevant for production 
deployments.

Christian


Re: SMX5.5 CXF-osgi depedencies

Posted by 이듀이 <de...@gmail.com>.
 if you use CXF Service in SMX 5.
you shoud install Feature (features:install cxf)


First Step. Check Feature

1) check featres list

karaf@root> features:list | grep cxf
[installed  ] [2.14.1          ] camel-cxf
camel-2.14.1
[uninstalled] [5.4.0           ] examples-cxf-osgi
servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-cxf-jaxrs
 servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-cxf-jaxrs-blueprint
 servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-cxf-jaxws-blueprint
 servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-camel-cxf-rest
servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-camel-cxf-soap
servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-cxf-ws-addressing
 servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-cxf-ws-security-osgi
servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-cxf-ws-security-blueprint
 servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-cxf-ws-security-signature
 servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-cxf-ws-rm
 servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-cxf-wsn-receive
 servicemix-examples-5.4.0
[uninstalled] [5.4.0           ] examples-cxf-wsn-notifier
servicemix-examples-5.4.0
[installed  ] [3.0.2           ] cxf-specs
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-jaxb
 cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-abdera
 cxf-3.0.2
[installed  ] [2.0.2           ] wss4j
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-core
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-wsdl
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-ws-policy
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-ws-addr
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-ws-rm
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-ws-mex
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-ws-security
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-rt-security
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-http
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-http-jetty
 cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-http-async
 cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-http-netty-client
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-http-netty-server
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-bindings-soap
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-jaxws
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-jaxrs
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-rs-security-xml
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-rs-security-sso-saml
 cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-rs-security-cors
 cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-rs-security-oauth
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-rs-security-oauth2
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-databinding-aegis
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-databinding-jibx
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-databinding-jaxb
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-databinding-xmlbeans
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-features-clustering
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-bindings-corba
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-bindings-coloc
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-bindings-object
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-transports-local
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-transports-jms
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-transports-udp
 cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-transports-websocket-client
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-transports-websocket-server
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-javascript
 cxf-3.0.2
[installed  ] [3.0.2           ] cxf-frontend-javascript
cxf-3.0.2
[installed  ] [3.0.2           ] cxf-xjc-runtime
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-tools
cxf-3.0.2
[installed  ] [3.0.2           ] cxf
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-sts
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-wsn-api
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-wsn
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-ws-discovery-api
 cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-ws-discovery
 cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-bean-validation-core
 cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-bean-validation
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-bean-validation-java6
cxf-3.0.2
[uninstalled] [3.0.2           ] cxf-management-web
 cxf-3.0.2
karaf@root>


you can find cxf. it already have installed.

 [installed  ] [3.0.2           ] cxf-core
 cxf-3.0.2



Second Step. add Install CXF ( if already have installed, pass it)

if you use Karaf  or you don't find CXF  you should add Install CXF

1. copy feature.xml (apache-cxf-3.0.2-features.xml)  to system directory

  \system\org\apache\cxf\karaf\apache-cxf\3.0.2\apache-cxf-3.0.2-features.xml

2. copy jars ( cxf )  to system directory

   system\org\apache\cxf\*


3. edit etc/org.apache.karaf.features.cfg

you must add features.xml at featuresRepositories
and must add feaures Name (cxf) at  featuresBoot



Third Step Test example Webservice

1. test features install

karaf@root>
karaf@root> features:install examples-cxf-osgi
karaf@root>

2. open your brower and access http://localhost:8181/cxf

you can see "example cxf webservice"

Available SOAP services:
HelloWorld

   - sayHi

Endpoint address: http://localhost:8181/cxf/HelloWorld
WSDL : {http://cxf.examples.servicemix.apache.org/}HelloWorldImplService
<http://localhost:8181/cxf/HelloWorld?wsdl>
Target namespace: http://cxf.examples.servicemix.apache.org/


2015-08-18 23:29 GMT+09:00 yr <ya...@capgemini.com>:

> Hello
>
> I try to deploy a cxf-osgi service with depedencies defined in the Imported
> Packages section in META-INF file. These depedencies will be also share
> with
> others services
>
> What is the best solution to add theses depedencies in SMX ?
>
> Is it to copy all jar in SMX5.5_HOME/lib folder ?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/SMX5-5-CXF-osgi-depedencies-tp5722888.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>