FAQ about Web Services and Related Technologies

I got this from JavaRanch, can not hesitate to put it here.

What is a Web Service?

In simple terms a Web Service is an application or business logic that is accessible using standard Internet protocols.

Can I access a web services from any application?

Yes, if your application supports XML based object request and response.

Are there any real web services available for testing?

Yes, check http://xmethods.net/

What is the best Web Service Testing tools?

I would say SoapUI, it is perfectly for installation and implementation. Now if you know some about Web Service, you can start practice with SoupUI and xmethods.net. This can help you understand Web Service.

What are the current free and commercial implementations available for Web Services?

  • Apache Axis and Axis 2
  • JAX-WS Reference Implementation
  • Metro (includes the JAX-WS reference implementation)
  • Apache CXF (formerly XFire)
  • Apache SOAP is now obsolete; use Axis instead
  • MS.NET
  • Java 6 includes the JAX-WS reference implementation (and a minimal server for it)
  • You can find a big list here http://xmethods.net/ve2/ViewImplementations.po
Web Service protocols and supporting package

Web Service protocols and supporting package

Can I access a web service from within a browser?

You can use the JavaScript XmlHttpRequest object (read introductions here and here). You'll have to create and process the XML requests and responses yourself, though. This works in Internet Explorer, Safari and Mozilla-based browsers like FireFox.

What are the differences between JAX-RPC, JAX-WS, Apache Axis, SAAJ, Apache SOAP, JWSDP, Metro, Jersey and GlassFish?

  • JAX-RPC is a specification/API for Java developers to develop SOAP based interoperable web services. This API is now obsolete, and may be dropped from the next JEE version.
  • JAX-WS is the successor to JAX-RPC. It requires Java 5.0, and is not backwards-compatible to JAX-RPC. This article describes the high-level differences to JAX-RPC.
  • SAAJ is another specification/API for using SOAP envelopes with or without attachments. It operates on a lower level than JAX-RPC or JAX-WS, both of which will use SOAP envelopes based on SAAJ if needed.
  • Apache Axis is an open source implementation of the Java WS APIs for sending and receiving SOAP messages. Axis 1 supports JAX-RPC and SAAJ, while Axis 2 supports SAAJ and JAX-WS.
  • Apache SOAP was the first SOAP implementation. It is now obsolete. It's better to use Apache Axis to avail oneself of the latest features.
  • Sun JWSDP - Sun Java Webservices Developer Pack, is an implementation of JAX-RPC, SAAJ and various other XML Java technologies. It is now deprecated in favor of GlassFish.
  • GlassFish is the open source reference implementation of J2EE 5. As such, it contains an implementation of JAX-WS.
  • Metro is the web services stack used in GlassFish?. It supports SAAJ, JAX-WS, WS-Security and other standards.
  • Jersey is the reference implementation of the JSR-311 standard for RESTful web services.

What is REST?

  • Compared to SOAP, REST is a lighter-weight and less feature-rich approach to building web services. As such, it does not support the infrastructure built on top of SOAP (like WSDL, UDDI and WS-Security). JAX-WS supports a limited kind of REST API.
  • RESTful Web services: The basics by Alex Rodriguez
  • Introduction by Roger L. Costello
  • Best Practices by Hao He
  • Comparison between SOAP and REST by Paul Prescod
  • REST versus SOAP - the REST story by William Brogden
  • REST versus SOAP - the SOAP story by William Brogden
  • I finally get REST. Wow by Tim Ewald
  • WS* vs. REST / Intelligence vs. Wisdom by Richard Monson-Haefel
  • How I Explained REST to My Wife by Ryan Tomayko
  • REST vs. WS-*: A Parable by Elliotte Rusty Harold
  • Using REST with JAX-WS by Sameer Tyagi
  • An Introduction to Resource-Oriented Architectures by Leonard Richardson and Sam Ruby
  • Book: RESTful Web Services
  • Restlet Lightweight REST framework for Java
  • Jersey a reference implementation of JSR-311 : JAX-RS: The Java API for RESTful Web Services
  • Project Zero : SOA for the Web , Building RESTful services for your Web application , RESTful applications in an SOA

Where can I find the relevant standards?

  • SpecificationUrls lists all major standards
  • SOAP introduction
  • How the SCDJWS exam objectives map to the standards - Post by Valentin Crettaz
  • Article What's new in WDSL 2.0?

How do I get started building a web service? Show me some code!

  • Introduction to SOAP and Apache SOAP
  • Article on JavaWorld - http://www.javaworld.com/javaworld/jw-01-2002/jw-0125-axis_p.html
  • Another article on JavaWorld - http://www.javaworld.com/javaworld/jw-04-2003/jw-0411-axis_p.html
  • Building a WS using Axis and JAX-RPC
  • Web Services Made Easy with JAX-WS 2.0
  • Webservices in JDK 6
  • Introducing JAX-WS 2.0 With the Java SE 6 Platform
  • Many questions are answered in the Apache Axis Wiki

Some useful code snippets

  • How can I set HTTP headers like SOAPAction or Basic Authentication in my SOAP request?
  • How can I use HTTP Basic Authentication in my JAX-RPC client?
  • With Axis, how can I access authentication information if I use HTTP Authentication?
  • With Axis, how can I find out which service and operation was invoked?
  • What is the simplest possible Java client for a web service?
  • How do I handle WS-Security UsernameTokens with WSS4J?

What other sources of information are available particularly for Java Web Services?

  • JAX-WS articles, FAQ, Wiki and more - https://jax-ws.dev.java.net/
  • How to run JAX-WS on Tomcat
  • JSR-181 - Web Services Metadata for JAX-WS - article
  • Developing Web Services using EJB 3.0
  • Getting Started with JAX-RPC - http://java.sun.com/developer/technicalArticles/WebServices/getstartjaxrpc/
  • Designing Web Services with the J2EE 1.4 Platform: JAX-RPC, SOAP, and XML Technologies - http://blueprints.dev.java.net/books.html
  • JAX-RPC, JAX-WS and SAAJ are Java APIs that implement SOAP; introduction to SAAJ
  • Sun Java Web Services Tutorial - http://java.sun.com/webservices/docs/1.6/tutorial/doc/index.html
  • The XML Tips on IBM developerworks have a Java slant, and cover Web Services as well (some interesting ones are linked below) - http://www-128.ibm.com/developerworks/views/xml/libraryview.jsp?search_by=tip:
  • Web Services for J2ME - http://developers.sun.com/techtopics/mobility/apis/articles/wsa/
  • WebServicesReadingRoom of the Apache WS Project - http://wiki.apache.org/ws/WebServicesReadingRoom
  • Web Services Links & Resources
  • Web Services Resources
  • WSDL design tips and more

Which other software packages help implement Java Web Services?

  • The Apache Web Services Project has a number of helpful libraries
  • WSS4Jimplements WS-Security
    • WSS4J Wiki
  • Sandesha implements WS-ReliableMessaging
  • jUDDI and UDDI4j implement UDDI
  • BPEL:
  • BPWS4J is no longer being developed.
  • Apache ODE
  • Introduction part 1 Introduction part 2
  • article BPEL and Java
  • Three part series on Reg Developer: part1 part2 part3
  • Suns JWSDP reference implementation (version 1.6)

More articles on specific topics

  • What are WSDL styles and which one should I use: article on IBM DeveloperWorks
  • Using Java Collections with SOAP http://www.ibm.com/developerworks/xml/library/ws-tip-coding.html
  • Send and receive SOAP messages: using SAAJ , using JAX-RPC
  • Create a JAX-RPC handler http://www.ibm.com/developerworks/xml/library/ws-tipjax2.html
  • Using SOAP headers: with Axis client , with JAX-RPC , with JAX-RPC
  • Transferring files over a web service
  • Sending SOAP attachments using SAAJ
  • Sending SOAP attachments with JAX-RPC
  • Web Services, Opaque Data, and the Attachments Problem - Explore the many possibilities for dealing with opaque data in Web services (including SwA, WS-Attachments and DIME, PASwA, MTOM), and see the problem modeled with a classic childhood toy.
  • Understanding Web service interoperability http://www.ibm.com/developerworks/library/ws-inter.html
  • Exception handling with JAX-RPC: Introduction , Introduction
  • Asynchronous operations and Web services: Part 1 , Part 2
  • Introduction to HTTP and WS-Security authentication in Web Services: article in JavaRanch Journal, update for Axis 2
  • Introduction to WS-Security encryption: article in JavaRanch Journal
  • Patterns and Strategies for Building Document-Based Web Services: article on the Sun Developer Network
  • Obstacles to the adoption and successful realization of Service-Oriented Architecture: SOA Antipatterns
  • Using explicit and implicit SOAP headers with WSDL http://www.ibm.com/developerworks/xml/library/ws-tip-headers.html
  • A little bit about Message Context in JAX-WS


Check the JavaRanch Bunkhouse Web Services And SOAP category.

The book title is linked to the publisher where sample content may reside. The ISBN links to Amazon US which tends to list reviews.

SOA Using Java™ Web Services (2007) ISBN 0130449687 Web page Bunkhouse Review

Examines web service technology in a Java EE 5 context as implemented on the Glassfish application server. Covers JAX-WS 2.0 and JAXB 2.0. Mark D. Hansen’s posts during the book promotion. Why is Java Web Services so Hard?

RESTful Web Services (2007) ISBN 0596529260

Explains the principles of REpresentational STate transfer and Resource Oriented Architecture (ROA). Specifies design procedures for resource URIs and resource (state) representations (XML being only one option). Many examples use Ruby but one example does use the Restlet framework. Also looks at AJAX applications as REST clients. Leonard Richardson’s and Sam Ruby’s posts during the book promotion.

J2EE Web Services (2004) ISBN 0321146182 Bunkhouse Review Author's Blog

Examines web service technology in a J2EE 1.4 context. Covers XML, XML Schema, SOAP 1.1, WSDL 1.1, WS-I Basic Profile 1.0a, UDDI 2.0 as general web service standards and the Java APIs using them: (the now dated) JAX-RPC (incl. EJB endpoints), JAXR (level 0), JAXP, SAAJ, SwA; deployment descriptors are also covered.

Designing Web Services with the J2EE™ 1.4 Platform (2004) ISBN 0321205219 On-line Version PDF Version

A more design/architecture oriented examination of web service technologies in a J2EE 1.4 context.

Service-Oriented Architecture: Concepts, Technology, and Design (2005) ISBN 0131858580

SOA with SOAP web services explained. Just don't expect to see any code as this is a platform independent discussion of SOA with SOAP web services.

Service-Oriented Architecture: A Field Guide to Integrating XML and Web Services (2004) ISBN 0131428985

An examination of how XML technologies, SOAP, WSDL, UDDI, and various WS-* standards can be used to move towards a Service-Oriented Enterprise. No code as this is a platform independent exploration.

SOA Principles of Service Design (2007) ISBN 0132344823

Service-Orientation isn't Object-Orientation. Discusses the service design principles needed to develop services that can operate successfully in a SOAP-based SOA.

SOA in Practice: The Art of Distributed System Design (2007) ISBN 0596529554

Need an SOA instead of a JaBoWS (Just another Bunch of Web Services)? While not specifically written for web service based SOAs but more towards large distributed systems in general this book presents some of the benefits that you can realize by adopting service-orientation and SOA practices. More importantly it reveals that large distributed systems can turn some common sense best practices established for smaller or component-based systems on their heads (example: the perceived need for a common business object model across the entire system). Interview

Java Web Services in a Nutshell

Building Web Services with Java: Making Sense of XML, SOAP, WSDL, and UDDI

Developing Web Services with Apache Axis

Developing Java Web Services: Architecting and Developing Secure Web Services Using Java

Java Web Services Architecture

Category >> Web Services  
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
String foo = "bar";
  • We get now all types helps from online now. This is huge collection of solution and i know any kind of problems we can solution in a short time. This is so favorite for us.