Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo with CXF Web Services
Virgo with CXF Web Services [message #661694] Sat, 26 March 2011 10:22 Go to next message
Adam Connelly is currently offline Adam ConnellyFriend
Messages: 2
Registered: March 2011
Junior Member
Hi,

Sorry if this is already answered somewhere, but I've been searching for a while and haven't been able to find any information about this.

Are there any tutorials available or any information about writing CXF web services as osgi bundles for Virgo? I've tried following the instruction in the greenpages sample app, but instead of creating a web app I've created a project that has a CXF service, but I'm obviously doing something completely wrong since I just can't get the application to start.

I can provide more information on the problem I'm having, but if there's already any tutorials available about this I'm happy to check them out first.

Cheers,
Adam
Re: Virgo with CXF Web Services [message #661839 is a reply to message #661694] Mon, 28 March 2011 08:08 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
I'm not aware of any tutorials so, unless others who have used CXF with Virgo chime in, you'd better describe the symptoms.
Re: Virgo with CXF Web Services [message #662338 is a reply to message #661839] Wed, 30 March 2011 09:43 Go to previous messageGo to next message
Violeta Georgieva is currently offline Violeta GeorgievaFriend
Messages: 244
Registered: October 2010
Senior Member
Hi,

I hope it is not too late for my answer.
Here is how you can run one very simple web application that uses CXF WS.

download CXF - http://cxf.apache.org/download.html
download Axiom - http://ws.apache.org/axiom/download.cgi

Some of the CXF jar files have OSGi metadata in their MANIFEST.MF file so you can use them directly from the CXF distro, but some of them do not have so here is what I've done:

From CXF distro you can use:
- cxf-2.3.3.jar
- geronimo-jaxws_2.2_spec-1.0.jar
- geronimo-ws-metadata_2.0_spec-1.1.3.jar
- neethi-2.0.4.jar
- XmlSchema-1.4.7.jar

From the EBR you can download:
- com.springsource.javax.wsdl-1.6.1.jar
- com.springsource.javax.xml.bind-2.2.0.jar
- com.springsource.nu.xom-1.1.0.jar
- com.springsource.org.apache.xml.resolver-1.2.0.jar
- com.springsource.org.jaxen-1.1.1.jar
- com.springsource.org.objectweb.asm-3.2.0.jar

The axiom.jar does not have OSGi metadata in the MANIFEST.MF, so I used bundlor in order to create such.

So put all 12 bundles in the <Virgo-Home-Dir>/repository/usr.
Open <Virgo-Home-Dir>/lib/java6-server.profile
There is org.osgi.framework.system.packages property
Add one more package: javax.xml.namespace;version="1.0.0"
org.osgi.framework.system.packages = \
...
 javax.xml.namespace,\
 javax.xml.namespace;version="1.0.0",\
...

Start Virgo
Then put in the pickup directory the attached web app bundle.
Request http://localhost:8080/cxf/ws/AccountProcess?wsdl

Hope this helps.
Regards
Violeta
Re: Virgo with CXF Web Services [message #663401 is a reply to message #662338] Mon, 04 April 2011 20:50 Go to previous messageGo to next message
Adam Connelly is currently offline Adam ConnellyFriend
Messages: 2
Registered: March 2011
Junior Member
Thanks a lot, it's definitely not too late and that's exactly what I'm looking for.

Unfortunately I'm just looking into this when I have a few minutes to spare, which is why I haven't replied up until now.

Cheers,
Adam
Re: Virgo with CXF Web Services [message #667375 is a reply to message #661694] Thu, 28 April 2011 12:16 Go to previous messageGo to next message
Daniel Kulp is currently offline Daniel KulpFriend
Messages: 1
Registered: April 2011
Junior Member
With CXF 2.4.0, if you use Karaf, it should be a LOT easier. CXF 2.4.0 has a Karaf features file that will allow Karaf to pull in all the required 3rd party bundles and get them all started.

Another option would be to look at Talend's Service Factory:
http://www.talend.com/download.php?src=HomeP age#SF

The main download has the OSGi container all pre-setup with all the dependencies and everything. That could help you figure out what you need.

The "examples" download has a bunch of examples that show how to build CXF services and deploy them into OSGi.

Re: Virgo with CXF Web Services [message #1057799 is a reply to message #662338] Wed, 08 May 2013 20:34 Go to previous messageGo to next message
Paul DiMilla is currently offline Paul DiMillaFriend
Messages: 2
Registered: May 2013
Junior Member
Hi,

I'm trying to get the example provided by Violeta to work. I'm using the exact versions specified in her post (CXF 3.3.2, etc.). I get the following when I start up Virgo.

[2013-05-08 08:11:46.082] fs-watcher                   <DE0002E> Installation of bundle 'sample.cxf.ws' version '1.0.0' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'sample.cxf.ws' at version '1.0.0': Cannot resolve: sample.cxf.ws
    Resolver report:
        A Require-Bundle could not be resolved. Resolver error data <Require-Bundle: org.apache.cxf.bundle; bundle-version="0.0.0">. Caused by missing constraint in bundle <sample.cxf.ws_1.0.0>
             constraint: <Require-Bundle: org.apache.cxf.bundle; bundle-version="0.0.0">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.apache.neethi; version="0.0.0">. Caused by missing constraint in bundle <org.apache.cxf.bundle_2.3.3>
             constraint: <Import-Package: org.apache.neethi; version="0.0.0">
        An Import-Package could not be resolved. Resolver error data <Import-Package: javax.xml.bind; version="2.2.0">. Caused by missing constraint in bundle <org.apache.geronimo.specs.geronimo-jaxws_2.2_spec_1.0.0>
             constraint: <Import-Package: javax.xml.bind; version="2.2.0">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.apache.axiom.om; version="0.0.0">. Caused by missing constraint in bundle <org.apache.neethi_2.0.4>
             constraint: <Import-Package: org.apache.axiom.om; version="0.0.0">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.jaxen; version="0.0.0">. Caused by missing constraint in bundle <org.apache.axiom_1.2.11>
             constraint: <Import-Package: org.jaxen; version="0.0.0">

	at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:46)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
	at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessGraph(CompensatingPipeline.java:73)
	at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
	at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:359)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:185)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:140)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:253)
	at org.eclipse.virgo.nano.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeployerFileSystemListener.java:225)
	at org.eclipse.virgo.nano.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeployerFileSystemListener.java:79)
	at org.eclipse.virgo.util.io.FileSystemChecker.notifyListeners(FileSystemChecker.java:373)
	at org.eclipse.virgo.util.io.FileSystemChecker.check(FileSystemChecker.java:282)
	at org.eclipse.virgo.nano.deployer.hot.WatchTask.run(WatchTask.java:48)
	at java.lang.Thread.run(Thread.java:722)

[2013-05-08 08:11:46.084] fs-watcher                   <DE0003E> Install failed for bundle 'sample.cxf.ws' version '1.0.0'. 


I am using Virgo Tomcat Server 3.6.1.RELEASE. Any help would be appreciated.

Regards,
Paul
Re: Virgo with CXF Web Services [message #1057874 is a reply to message #1057799] Thu, 09 May 2013 13:40 Go to previous messageGo to next message
Neil Corbet is currently offline Neil CorbetFriend
Messages: 12
Registered: October 2012
Junior Member
Paul,

Did you include those other bundles i.e neethi and the geronimo one to your repository? Possibly the axciom one as well. Looks like you are missing dependencies.

Are you using a plan to run them? If so you need to include them before your cxf bundle to ensure they start up before the one that depends on them.


Neil

[Updated on: Thu, 09 May 2013 13:41]

Report message to a moderator

Re: Virgo with CXF Web Services [message #1057903 is a reply to message #1057874] Thu, 09 May 2013 16:10 Go to previous message
Paul DiMilla is currently offline Paul DiMillaFriend
Messages: 2
Registered: May 2013
Junior Member
Neil,

I was missing some of the bundles that I downloaded from the EBR. I started moving them into the repository, stepped away from my computer and then forgot to move the rest. It now works. Thank you for your help.

Paul
Previous Topic:Problem deploying Apache CXF Webservice on Virgo: Cannot resolve XML Schema
Next Topic:Making bundles in Nexus available to virgo instance
Goto Forum:
  


Current Time: Sat Dec 20 00:58:49 GMT 2014

Powered by FUDForum. Page generated in 0.02080 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software