How to run metro webservice on OSGi + jetty? - web-services

I'm trying to get a WebService (wsdl) to work on Jetty using OSGi (Felix) + Metro ?
I got Servlets and JSP's working on OSGi + Jetty, but not a WebService using Metro. I have a sample OSGi WAR file to test, which I deployed on Glashfish and it worked. The same I need to deploy on Jetty.
Please share some samples or instructions on this.
Thank you
Vivek

Neil Bartlett has a project at Git hub, https://github.com/njbartlett/jaxrs-osgi-extender, that might be of interest.

Related

REST services running on Glassfish

I've developed REST web services using Jersey with NetBeans IDE.
Now I want to provide those services on Glassfish 3.1, without using NetBeans.
I want something like the .aar file that is created when we build web services with Apache Axis2.
Can you tell me how to do it? I have to use the .WAR file, right?
It is something like: http://qallme.sourceforge.net/docs/sec_DeployingAWebService.html ?
Thanks
I could do it by following that tutorial that I've mentioned above.
At first that was not working because of the context-rooton glassfish-web.xml. I had not filled it with the root resource.

consuming wsdl in spring mvc

My IDE set up is
Eclipse Indigo
Spring IDE for indigo
Spring STS for indigo
maven integration for eclipse
maven integration for eclipse wtp
Created a sample spring mvc project and performed maven clean and maven build.
I have a wsdl from client which i have included in a project that uses cxf-wsdl2java to generate the proxy code. Not sure if this is the right way to approach this. The web service is on 'axis'
Looking for tutorial on how to consume the wsdl and make the method calls in spring mvc project using maven. also is cxf the right way to approach this? particularly the wsdl2java approach
It is usually a good practice to use the wsdl2java with maven (except that I would have not copied the wsdl inside the resources, but I would have kept it on the distant server). As this if the wsdl change, you will ne notified directly with your build.
For your client, just configure your endpoint. see the 'Configuring a Spring Client' doc from cxf : http://cxf.apache.org/docs/jax-ws-configuration.html
You might want to look into the Spring Web Service project found here:
http://static.springsource.org/spring-ws/site/
Ihere is a tutorial (located here: http://static.springsource.org/spring-ws/site/reference/html/tutorial.html) on their website which goes through both creating a contract first web service, as well as a consumer of that web service.
Hope this helps!

Webservice, Axis & OSGI (knopflerfish)

I first warn you because I'm a beginner. So, I don't know if I'll be specific on all points. Here is my problem:
I have a wsdl file. Currently, I use Tomcat and Axis to deploy it. So for that, I use the wsdl2java tool of axis that generates me the "skeleton" of the webservice. And then I write on the generated files the code of the various methods of the webservice. Finally, I deploy the webservice on tomcat with Axis. Everything seems to work more or less.
The problem is that I want to deploy this webservice using the bundle axis of osgi (knopflerfish). But I don't know how to do it.
Should we use again the wsdl file and generate a code with a tool like wsdl2java but adapted to knopflerfish? or should I use the "skeleton" that I've created before with Axis and adapte it for osgi? And generally speaking, how can we use the axis bundle of knopflerfish?
To be honest, I do not find many things over internet about it. So that's why I write to the community :(
Thank you in advance for your help.
Found a article on http://www.ibm.com/developerworks/webservices/library/ws-OSGi/ for deploying a Webservice as OSGI bundles. This uses Eclipse Equinox as the OSGi container and Apache CXF as a web services framework and its deployed in Apache Servlet Container.Hope this meets requirement of depolying Webservices as OSGI service .

Deploying 'old-fashioned' Java web application in Equinox' Jetty

I'd like to deploy regular war (not OSGi-ed) in Equinox' Jetty. Doable?
The OSGi Web Container specification (part of the OSGi Enterprise Spec) allows you to do exactly this. You will need an implementation of the spec, and there are two available I believe: in Eclipse Gemini or Apache Aries.
Note that deploying a plain WAR to OSGi generally means you don't get any of the advantages of OSGi such as the ability to modularise your web application into bundles. However it is a useful transitional step.
You're going to want to read about Pax WAR Extender since this is what will be putting the war into Jetty. I find that it's best to do the bare minimum to OSGI-fy the war since it should not make the war unusable in a normal app server.
As the link mentions, read this for how to run a WAR with no modification. http://ops4j1.jira.com/wiki/display/paxurl/War+Protocol.
Or this to run a WAR with minor modification http://ops4j1.jira.com/wiki/display/paxweb/OSGi-fy+your+WAR.

JBoss6 Classloading Jar Search Order

We are migrating a web application from JBoss 4.2.3 to JBoss 6. The application needs to control the order in which jars are searched for classes during classloading. This was achieved in JBoss 4.2.3 by hacking EARDeployer class in jboss.jar to add jars to the DeploymentInfo object in a specific order.
Is there a way to achieve the same result in JBoss 6?
Ales Justin over at JBoss was able to help me through this. Our conversation can be found here: Link