aspose file tools*
The moose likes Web Services and the fly likes JAX WS With REST 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 REST" Watch "JAX WS With REST" New topic
Author

JAX WS With REST

Vignesh Bhupathi
Greenhorn

Joined: Mar 04, 2009
Posts: 29


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

Regards,
Vignesh SCJP 5 ,SCWCD 5 , SCDJWS 5 , SCBCD 5, SCEA PART-1
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42602
    
  65
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.


Ping & DNS - my free Android networking tools app
Vignesh Bhupathi
Greenhorn

Joined: Mar 04, 2009
Posts: 29
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
Marshal

Joined: Mar 22, 2005
Posts: 42602
    
  65
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.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
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

Joined: Mar 04, 2009
Posts: 29


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
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61627
    
  67

Cliff Ahead


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vignesh Bhupathi
Greenhorn

Joined: Mar 04, 2009
Posts: 29
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
Marshal

Joined: Mar 22, 2005
Posts: 42602
    
  65
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

Joined: Mar 04, 2009
Posts: 29
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61627
    
  67

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

Joined: Mar 04, 2009
Posts: 29
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
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
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

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JAX WS With REST