0

I am looking to deploy a Java Web Service without needing a server application. I know that I can deploy C# WCF services by hosting the executable file (ServiceHost class in C#), but can I do a similar thing in Java?

wattostudios
  • 8,666
  • 13
  • 43
  • 57
Rafko1003
  • 1
  • 1

3 Answers3

1

Why wouldn't you want to install a local instance of Apache Tomcat? It's free, and real easy to set up and get running to test web apps in Java.

http://tomcat.apache.org/

Chad
  • 872
  • 8
  • 24
  • Yes , of course, I did like that , but it doesn't suit me well. This application will be consuming wcf service providing from our server and also it will be asking form something . I need this application to be listener. All base on push technology. Someone told me about HttpSessionListener. I can't install server appi(tomcat etc.) My Boss said it can't work like that. All's new for me. – Rafko1003 Jun 28 '12 at 19:32
0

Yes you can, but in that case you'll be limited to consuming the service locally. It is possible to not use a server if you are testing your services locally. But you need a dedicated application server to host the web services when you actually deploy the services on the production. For example you can create a SOAP web service using JAX-WS and publish that service to a local WSDL file. Your client can then use the endpoint URL something like

http://localhost:9999/ws/hello?wsdl

to access the service.

This link will help you getting started with Java based web services.

Abhishek Gupta
  • 320
  • 2
  • 12
0

As a matter of fact you can. http://cxf.apache.org/docs/simple-frontend.html

I would advise against though. Running a smal jetty instance for this isn't a big overhead, but will make your life much easier.

EDIT:

contrary to what @Abhishek Gupta said, you won't be limited to local access of course.

Gergely Szilagyi
  • 3,813
  • 1
  • 14
  • 12