• 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

New To Web Service

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

I am new to Web Service.Please suggest me a environment for starting off with the development of Web services.

Thanks in Advance,
Supraja
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are your requirements? What are you wishing to accomplish?

Have a look at web services tutorial? to see what kind of issues need to be clarified.
 
Supraja Kannaiyan
Ranch Hand
Posts: 42
  • 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 would like to develop a webservice in Java. It Should access the data from the SQL Server database and return the data based on the parameter passed by the client.This is my Requirement.


 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Reading DB in web service is no different than any type of Java application.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A standard servlet container (like Tomcat) and a WS toolkit to run on top of it would be needed. For SOAP-type services, Apache Axis 2 is a good choice, while for REST-type services the Jersey library can be used.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Supraja Kannaiyan wrote:I would like to develop a webservice in Java.


So you have chosen the implementation platform for your service (but not: (1) the version of Java (which may limit the web service platform that you can use), (2) the web service technology (SOAP, XML(or JSON) over HTTP, XML-RPC, RESTful etc.) or even (3) the web service platform (Axis, Axis2, Apache CXF, JAX-WS RI, Jersey, Restlet, etc.).

It Should access the data from the SQL Server database and return the data based on the parameter passed by the client.


That is what you want to do inside the service and hopefully want to "hide" from the service consumer.

What about the "requirements" of the service consumer? The service has no reason for existing without its service consumers. Is there only one single consumer? Are there many consumers? Are there many consumer types? Are the consumers accessing the service across an intranet, across firewalls, across the internet? What data format (or media types) can the service consumers "consume" (text, XML, JSON, SOAP (rpc/encoded, rpc/literal, document/literal), etc.). What kind of security is needed (user authentication, transport level security, message level security, etc.) ?

Are there any other constraints that you are working against?
 
Supraja Kannaiyan
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Many Consumers will be accessing the web service across the Internet.Data Format is SOAP.User Authentication is needed.

Thanks for your Reply,
Supraja
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What version of Java (1.3, 1.4, 5+) will you be using?

Why did you decide to go with Axis 1.x rather than Axis2?

Are you intending to use WS-Security for User Authentication? WS-Security is the proper way to secure a SOAP web service - however some SOAP capable consumers are not WS-Security capable.

Why did you decide that a SOAP web service is the best fit for your particular application?
 
Supraja Kannaiyan
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using Java1.5. I am using Eclipse tool which uses Axis 1.3 version. Since I dont have much knowledge about web service, I have chosen SOAP based web Services blindly.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While Axis 1.x is simpler, using Apache Axis2 would probably be a safer choice (Rampart implements WS-Security for Axis2). Axis2 has the nice option of using JiBX for XML binding, which is useful if you have pre-existing XML Schemas that need to be bound to pre-existing Java Objects.

IDE support shouldn't really be a deciding factor when choosing a SOAP web services stack because it is more important that it works after deployment.

As you are using Java 1.5 you can use JAX-WS which is the current (Sun) standard API for building Java-based SOAP web service providers and consumers. It uses JAXB for XML binding. JAX-WS and JAXB are a standard part of the JDK 1.6. JAX-WS is part of the Metro web service stack that focuses "on reliable, secured, and transacted web service interoperation, including those with .NET services". If you require an IDE NetBeans can use JAX-WS "out of the box".

Java 1.5 should also allow you to use Apache CXF.

Given the choice of SOAP web service stack I'd go with JAX-WS - but that is just my personal choice.

How was it established that you need a SOAP web service in the first place?
See: RESTful HTTP web services vs. Big Web Services (SOAP/WSDL)
 
Supraja Kannaiyan
Ranch Hand
Posts: 42
  • 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. As I have already told that I dont have much idea about web services, I have chosen Soap based web services. What are the various technologies using which we can develop Web Services?

Thanks,
Supraja
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Supraja Kannaiyan wrote:What are the various technologies using which we can develop Web Services?



Current generation Java-based "Web service" (i.e. SOAP/WSDL) stacks: JAX-WS, Apache Axis2, Apache CXF (formerly Codehause XFire)

Previous generation Java-based SOAP stacks which include (not necessarily interoperable) SOAP encoding support: JAX-RPC, Apache Axis 1.x

Some of the current generation Web service stacks (JAX-WS, Axis2) also include support for "XML/HTTP" binding - transporting XML data over HTTP without SOAP envelopes.

SOAP wasn't designed to be used exclusively over Web, even though the name "Web services" may imply that. In fact "Web services" don't really operate in a manner that can take advantage of the inherent characteristics of the Web. "Web services" practice message-based/document-oriented RPC - "the Web" is all about "resources" - it is a REST architecture. So in 2002 (4 years after SOAP was designed) the concept of RESTful web services was formulated.

SOAP's popularity is based on
  • the fact that developers are comfortable with the RPC concept
  • the availability of code-generation tools for it
  • its extensibility which gave rise to the numerous WS-* standards
  • it being used as the key enabling protocol for many SOA foundation software products (for which the hype finally seems to be plateauing).

  • However more and more web sites are realizing that they do not need the flexibility (and associated complexity overhead) of SOAP and WS-* for their "Service-over-the-Web" which explains why RESTful web services are becoming more popular.

    XML for PHP developers, Part 3

    Yahoo chose REST because of a common belief among developers that REST offers 80% of SOAP's benefits at 20% of the cost.


    Other development communities (Ruby, Perl, PHP) seem to have all but given up on SOAP after the it became apparent that "SOAP encoding" couldn't be interoperable.

    Java-based RESTful web service frameworks: Jersey (JAX-RS (JSR-311)), Restlet.

    RESTful HTTP web services vs. Big Web Services (SOAP/WSDL)

    For more information see the Web Services FAQ
    reply
      Bookmark Topic Watch Topic
    • New Topic