Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAX-WS with JSON on Glassfish

 
Sim Kim
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sim Kim
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf :

Is this same as JAX-RS : https://jax-ws-commons.dev.java.net/json/
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Give a try on this too http://code.google.com/p/jsonwebservice/
 
Sim Kim
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sundar .

It seems that the code is not using JAX-WS RI .
 
Sundar Murthi
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic