2

Using JAX-WS on Java SE 7.

The guides on Soap Handlers seem to assume a Java EE server. Is this essential for SOAP handlers or can they also work in Java SE?

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Joel Shemtov
  • 3,008
  • 2
  • 22
  • 22

2 Answers2

4

You can implement web services in Java SE.

You just need to start up an Endpoint and publish it.

This is a simple example.

Java EE and servlet containers handle the publishing part for you. Outside of that, they're pretty much the same thing and handled the same way.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Will Hartung
  • 115,893
  • 19
  • 128
  • 203
-2

A web service gets deployed either on a Servlet container (like Tomcat) or any Java EE application server (like JBoss AS, WebLogic etc).

So Java SE is not enough for deploying your web service.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
rai.skumar
  • 10,309
  • 6
  • 39
  • 55
  • Implementing a client not a service I would like to know if I may use soap handlers. Thanks – Joel Shemtov Dec 06 '12 at 15:45
  • 1
    Client implementation you can do in pure Java so J2SE is enough. – rai.skumar Dec 06 '12 at 15:46
  • Your answer is plain wrong. J2SE provides full support for both web service clients AND web service implementation. See [this answer](http://stackoverflow.com/questions/13001739/compile-ws-client-in-java-1-5-missing-webservice-like-annotations/13005434#13005434) and [this answer](http://stackoverflow.com/questions/12860588/java-web-service-without-a-web-application-server/12870543#12870543) – kolossus Dec 07 '12 at 02:50
  • @kolossus pls check my answer carefully. I am talking about "web service deployment" and not implementation. In fact i have also mentioned in my comment that J2SE is enough for writing client. – rai.skumar Dec 07 '12 at 06:06
  • Webs service deployment if I'm not mistaken means that you're **running** a web service no? So yes, you can deploy a webservice on J2SE using the [endpoint API](http://stackoverflow.com/q/4735116). – kolossus Dec 07 '12 at 14:21