• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

What is leading Java Web Services framework?

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

I have some basic idea on web services but never implemented in any of real time projects.
Now i want to learn java web service development and i got plenty of options when i googled for available java webservice frameworks.

Now the list i have with me is JAX-WS, JAX-RS(Jersy, RestEasy), Axis2, Apache CXF, Spring-WS .

Can anybody give me an idea on which one is better to start with and which is being used widely these days??

Thanks in advance
Siva :
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You forgot JBossWS :-)

On the SOAP side, I think Metro (which includes the JAX-WS RI) is probably the most widely used one, followed by Axis2.

For REST, I think it's hands-down Jersey.

I'd start with REST and Jersey, just to see how easy it is, and only graduate to SOAP if necessary. SOAP is more complex (more capable, too), and is in many places being phased out in favor of REST. The WebServicesFaq contains many useful links.
 
Siva Prasad Reddy Katamreddy
Ranch Hand
Posts: 32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for your reply.

I started playing with Jersy for a couple of hours and its really really easy to start with Jersy if you want to work with JAX-RS.

Based on my initial understanding, with JAX-RS we need to send the data through URL or as HttpServletRequest parameters for POST/PUT requests. But in realtime we may need to send a complex objects to consume the Web Services. It may not be practically feasible to send the data as a flat URL or Request parameters. We may want to send it as an Object(A complex object represing the business model object).

With JAX-WS we can prepare SOAP message for any complex request and send across to the Web Service provider.

Could you please clarify me in what scenarios we can go for Jax-RS and for JAX-WS??

For suppose if we are building a system to provide financial services to the world. Out Web Serice will take the Customer Identity information and provide their Account details, or do some transactions etc.

In such a case which one will you prefer?

Thanks,
Siva
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

It may not be practically feasible to send the data as a flat URL or Request parameters.


Why not? Not as part of the URL, obviously, but as part of POST/PUT request bodies it should work nicely. Just in case by "Object" you meant a serialized version of a Java object - that's not a good idea, cross-platform compatibility is one of the major advantages of WS.

As an aside: I think you don't mean "real time", you mean "real world". If you actually meant Real-time_computing, then any kind of network access is right out.
 
Siva Prasad Reddy Katamreddy
Ranch Hand
Posts: 32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I mean sending the object with all the properties in relational way would me more meaningful.

Like

<customer>
<id>100</id>
<name>John</name>
<address>
<line1>aaaa</line1>
<line2>aaaa</line2>
</address>
</customer>

would be more meaningful than

<customer>
<id>100</id>
<name>John</name>
<address_line1>aaaa</address_line1>
<address_line2>aaaa</address_line2>
</customer>

But for JAX-RS, to send the customer data through Request Parameters we can send all by strings in flat way.

Thanks,
Siva
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you need to look into JAXB, which is supported by both JAX-RS and JAX-WS. It relieves you of all the details of transmitting structured data, and your resulting code only deals with Java objects.

I can almost guarantee that as long as you're thinking about "request parameters" and such, you're not realizing all the benefits of either of these APIs.
 
Always look on the bright side of life. At least this ad is really tiny:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic