REST services running on Glassfish - web-services

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.

Related

Cant Find my Axis2 Web Service deployed on OpenShift

I deployed a web service developed using Apache Axis2 on Openshift.
When I try accessing the axis2 index.jsp, I can see the index page which only contains the default Version.
Q:
How do I get to display the web service other web services I created as I can view them on my localhost through the browser in Eclipse?
I have done a few searches online and seen some suggestions as to making adjustments to axis2.xml. In that regard, I have tried changing the contextRoot parameter and the servicePath without no success though I am not too sure if I am making the right changes.
My project structure in Eclipse is shown below:
SieveService
+...
+Java Resources
++src
+++Model
++++some model classes
+++Services
++++SieveServiceService.java
++Libraries
+...
+WebContent
++axis2-web
+++...
I had the same problem and that's occurs because openshift's tomcat server only deploys services in aar format, meanwhile in localhost deploys aar and exploded files too.
You need to create a aar file with your services and put it into your WebContent/WEB-INF/services/ directory. You need to update the services.list file too with the name of your services.
After that you must see your services in your openshift server.

Apache ODE BPEL Deployment with a webservice (file transfer)

I'd like to write a axis2 webservice for deploying BPEL Processes on a Apache ODE.
At the moment I have two main issues/questions.
I wrote a simple WS that creates a file.
It works fine in eclipse with a integrated apache tomcat with axis2.
But if I run the service on the exact same server without ecplise it won't work and I get 'Unhandled IOException' Errors, although I have the handling implemented (otherwise ecplise would cry about it all the time).
EDIT: I solved it by not uploading the service.aar with axis2 but putting it in the /webapps folder.
How do I get access to the folder were I need to put the BPEL files?
Is it obligatory that the service runs on the same server as the ODE?
EDIT: Getting access to the folder on the same server is an easy one with 1.
How do I transfer files with a webservice?
Better: How do I implement it?
Regarding 2) you can use the deployment API exposed by ODE. This allows for transfering deployment units (zip files containing BPELs, WSDLs, DDs) via SOAP to ODE and starting the deployment.
The WSDL is available at http://.../processes/DeploymentService?wsdl, on the default installation that would be http://localhost:8080/ode/processes/DeploymentService?wsdl

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!

How to deploy an Axis-generated soap service to an embedded Tomcat instance

I generated a Soap Service from a WSDL and now I need to deploy it to my existing application which uses embedded tomcat (I.E. I have a class which extends TomcatServeletContainer and a main class which instantiates that class and starts the server).
I see many examples for how to deploy an axis service to a standalone tomcat using a WAR, or a WSDD, but I don't see how to wire it together myself. I assume I have to define a servelet in the web.xml and provide some other glue. Any assistance or pointers to appropriate documentation would be most appreciated.
Thanks!
-Carl
Have you been able to get this to work?
I've been trying to build a webservice (in a standalone war-file containing the axis jars (w/dependencies)+server-config.wsdd) using maven. I really don't want to make any calls to the AdminClient at all (meaning not to install Axis).
I've generated the server side sources from a WSDL using the axistools-maven-plugin, and everything seems to work ok until I have deployed the service. http://localhost:8080/myApp/services gives me the name of the service and two exposed methods. But clicking the wsdl link displays an Axis error message telling me "Could not generate WSDL! There is no SOAP service at this location".
Is it at all possible to build a standalone Axis webservice this way using maven?
Yes, you will need build your application the same way you would for a WAR but programmatically inform tomcat where you exploded war lives.
Everything else should be the same as the standard servlet spec.

Where does the tomcat axis file server-config.wsdd come from?

Part of our system provides a web service through apache tomcat, the service is referenced in the server-config.wsdd file. Unfortunately nobody can remember how it got in there.
The apache set up has changed, and I need to update the system for the new configuration. What magic keywords can I google for to help me work out how and why it got into the existing server-config.wsdd, and how it might fit into the new server-config.wsdd
The server-config.wsdd file is generated by the wsdl2java tool from Axis. So, some developer used the tool and copied the file inside your Tomcat conf, where it belongs.
The server-config.wsdd is created when you deploy your web service by running
java org.apache.axis.client.AdminClient \deploy.wsdd
my knowledge says that it is hardcoded... and by using java org.apache.axis.client.AdminClient \deploy.wsdd or by explicitly invoking it through an ant script you can embody it to the server-config.wsdd and deploy the service