• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAX WS With REST

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I am able to fetch the value if i pass the value through URL as name-value pair(GET method- QUERY_STRING).How to get the value if i pass the value by POST method. Its returning as null when its passed by POST.

My first post in Java Ranch
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Are you certain that POST parameters are supported by the JAX-WS REST support? RESTful services generally use the URL for transporting parameters. And, of course, the JAX-WS REST support has been made obsolete by JAX-RS and its Jersey implementation.
 
Vignesh Bhupathi
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks ULF. I am just trying to figure it out whether i can able to fetch the post value.

I just googled and found a link where they are passing the value through POST.
http://www.java2s.com/Code/Java/Web-Services-SOA/RESTbasedWebServicesusingtheHTTPbindingandJAXWSProviderDispatch.htm

What is the basic difference or advantage AXIS2 with REST over JAX WS with Rest ?

Vignesh
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Axis2 an implementation of the JAX-WS API; it has some other REST facilities (search for "REST/POX" in the Axis documentation), but since those are Axis-specific I'd stay away from them. If I wanted to use REST with Java, I'd look into JAX-RS first.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my opinion, the attempt to cram REST into Axis2 is clumsy and doomed to be a side-show. I dont see how it could ever be a complete implementation of all REST concepts.

The Jersey project is an open source implementation of JAX-RS - as a fresh start it is a lot cleaner than tools that attempt to graft REST onto a SOAP foundation.

Bill
 
Vignesh Bhupathi
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I can able to get POST value using InputStream class. I like to know whether it will degrade the performance as well as is there any other way to get Post value.

Vignesh
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cliff Ahead

 
Vignesh Bhupathi
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,
I am newbie to java ranch !! So can you please let me know, what that img represent !!
Should i need to carry on with my approach?

Vignesh
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, it means you should not go that way. If you find yourself having to deal with the input stream, then you're most likely on the wrong track. And if you're extracting parameters you might as well use a regular servlet, which at least does that for you.
 
Vignesh Bhupathi
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ulf.If we use Service and Dispatch class in client side and set the value in post ,then there may be a chance to work.
But my scenario is entirely different. Client side is not using java.So i decided to go for JAX WS with REST ,since
client need to invoke only the URL (there is no need for WSDL,Stub files creation).

Vignesh
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vignesh Bhupathi wrote:So can you please let me know, what that img represent !!



It means you've been given good advice that you seem to be ignoring and seem determined to "walk off the cliff" even when advised not to.
 
Vignesh Bhupathi
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,
I am just analysis and trying to find a solution for my problem.Thanks a lot for your suggestion.
I won't use InputStream class since it will degrade the performance and a servlet can do this, but right now i have no other choice.
So how can i achieve this ?

Vignesh
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. STOP thinking in terms of JAX-WS
2. BACK UP a couple of thousand meters
3. THINK about how to define your problem in general terms without reference to ANY toolkit
Use pencil and paper or whiteboard to diagram the various parts of the application and how data moves around.
List outside requirements you have no control over.
4. SELECT the least complicated way to accomplish the essential requirements (see 3.)

Bill

 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic