how to run web service endpoint class in tomcat or jboss - java

I have created webservice using following link
http://www.ibm.com/developerworks/webservices/tutorials/ws-eclipse-javase1/section2.html
When i am running a endpoint publish class as java application in eclipse (in my case it is a runservice.java), web service is running fine.
i have created a client for the same webservice client is communicating with webservice properly.
I want to run this endpoint class with jboss or with tomcat without eclipse, it is possible to do this.
Please help.

Notice that the tutorial states that it is a tutorial on how to run a "stand alone webservice application". Since what you are creating is not a java web application but is instead a JavaSE application you will not be able to deploy it to an application server. You will have to create a java web application in order to do that.
Eclipse WS Tutorial

Related

How to Consume java web-service (jetty) in C#

I am a newbie to C# development.
Scenario -
We have an application running on .NET 2.0 framework and IIS 6.5. Now, we have installed another application on a remote server which utilizes Jetty web server. For us to integrate both the applications we need to add a reference to a web service in jetty. I have found the web service path on the server which is a .class file and I want to add a reference to my .NET application.
My problem is - how do I find the URL to add a web reference to the .NET application in Visual Studio ? or is there another way to integrate both the applications ?
Thanks
Have you tried using the .wsdl of the .NET web service to generate a proxy class in the Jetty web server? I am assuming there is some type of discovery mechanism built into the Jetty web server for web service capabilities, right?

Call an axis2 web service from a java application

I have create one simple web service and I deploy it to the axis2 web application based on this tutorial
After creating my service, I am able to deploy it to the server and I can see the WSDL file by this url: localhost:8084/axis2/services/HelloAxisWorld?wsdl
Now, I want to call this service by an independent java application. I found some pieces of code that makes the invocation, but I am facing problems because I suppose that I don't include the proper libraries in my project.
Does anybody knows an example to call the web service by using axis2?
A simple Google for 'axis2 client tutorial' gives me this. It covers setting up your classpath properly, generating java from the WSDL via wsdl2java, and developing the client from this.

deploy java jax ws web service as stand alone server

i am new to webservice. i need your help to understand deployment process.
I have created a new webservice by using following tutorial
http://www.ibm.com/developerworks/webservices/tutorials/ws-eclipse-javase1/section2.html
web service is running fine in eclipse,
right now i am running this service by right clicking on endpoint class and run it as java application. i want to run this service manually because on our server we not going to install eclipse.
You need to bundle your web service implementation classes as jar and you need to deploy to any Java EE complaint servers like JBoss or GlassFish.
You need some web site to host your application. Eclipse is hosting it for you on your local machine but to use manually I assume you mean you want it on a real site?

Converting java application to web service in netbeans

I have recently created a java application(calculator) in netbeans and need to make it into a web service. How do i convert it?
You should take a look at the Java API for RESTful Webservices (JAX-RS). You can easily convert a basic POJO into a webservice using annotations (http://download.oracle.com/javaee/6/tutorial/doc/gilik.html#gilru).
Of course, if your calculator application is just a standalone Java application (ie. main method running through command such as 'java calculator') you will have to setup a web application and run it in a web container. Check out http://download.oracle.com/javaee/1.4/tutorial/doc/WebApp.html for details on getting started with Java web applications. Check out GlassFish (http://glassfish.java.net/), Tomcat (http://tomcat.apache.org/) or Jetty (http://www.mortbay.org/) for some web container options.

Deploying Web Service

I have made an Axis2 Web Service in Java. I am using Apache Tomcat 6.0.32 as a Web Server. My Web Service gets the data from the database(MySQL), and it returns the data into my mobile application. Now I want to deploy my Web Service. What are the steps for that?
Check this link if you want to deploy without using eclipse
http://www.ibm.com/developerworks/opensource/library/ws-webaxis1/
If you are using eclipse then
In preferences setup the Axis 2 runtime
Right click on the project where you have your service implementation & choose the New webservice option. Use the Bottom Up Java Bean Web Service option
You can also quickly create a client to test it.

Categories