wood burning stoves 2.0*
The moose likes Web Services and the fly likes JAX-WS with JSON on Glassfish Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "JAX-WS with JSON on Glassfish" Watch "JAX-WS with JSON on Glassfish" New topic
Author

JAX-WS with JSON on Glassfish

Sim Kim
Ranch Hand

Joined: Aug 06, 2004
Posts: 268
Has anyone been able to deploy JAX-WS example with JSON ? What we have to write in WSDL and how do I invoke the service ? Please help me .
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42035
    
  64
Does JAX-WS really support returning JSON? I thought it could use SOAP only.

JAX-RS (and its reference implementation called "Jersey") supports JSON, though.


Ping & DNS - my free Android networking tools app
Sim Kim
Ranch Hand

Joined: Aug 06, 2004
Posts: 268
Ulf :

Is this same as JAX-RS : https://jax-ws-commons.dev.java.net/json/
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42035
    
  64
No, JAX-RS is a different API for RESTful web services.

I wasn't aware of that feature/library - it looks as if JAX-WS can indeed be made to emit JSON that way. That's quite interesting.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12791
    
    5
I found this WSDL 2.0 example on Wikipedia which shows WSDL defining a RESTful interface.

If anybody knows of a toolkit supporting WSDL 2.0 I would love to hear about it.

Bill
Sundar Murthi
Ranch Hand

Joined: Mar 05, 2004
Posts: 209
Give a try on this too http://code.google.com/p/jsonwebservice/
Sim Kim
Ranch Hand

Joined: Aug 06, 2004
Posts: 268
Thanks Sundar .

It seems that the code is not using JAX-WS RI .
Sundar Murthi
Ranch Hand

Joined: Mar 05, 2004
Posts: 209
It uses metro. It is jax-ws ri only. If you prefer to use all ri individual jars, you can just replace webservice-*.jar with RI jars.
 
GeeCON Prague 2014
 
subject: JAX-WS with JSON on Glassfish