JAX-WS based SOAP Web Service Jargons

In this article, we will learn and understand various terms/jargons used with respect to SOAP-based Web Service

Commonly used jargons w.r.t JAX-WS based web services are

  • WSDL (Web Service Description Language)
  • UDDI (Universal Description, Discovery and Integration)
  • SOAP (Simple Object Access Protocol)
  • XSD (XML Schema Definition)
  • XML (eXtensible Markup Language)

Now, we will discuss and understand these jargons in more detail. Starting from WSDL

Web Service Description Language (WSDL)

WSDL is interface definition language or contract which is used to describe the operations exposed by a Web Service to be very specific SOAP-based Web Service

Key points about WSDL

  • WSDL is a standard format to describe Web Service
  • It describes the message exchange formats such as Request/Response for any exposed operations
  • It is written in XML format with .wsdl extension
  • It is a W3C recommendation and accepted widely
  • Its often pronounced as “whiz-dull

Elements of WSDL 1.0

  • Types
  • Message
  • Operation
  • PortType
  • Binding
  • Port
  • Service

Current version i.e.; WSDL 2.0 has some major changes, those are

  • Removed message element
  • portType renamed to interface
  • port under service element renamed to endpoint

Elements of WSDL 2.0

  • Types
  • Operation
  • interface
  • Binding
  • endpoint
  • Service

WSDL 1.1. v/s WSDL 2.0

W3C_WSDL_11vs20

Source: WSDL wiki

Universal Description, Discovery and Integration (UDDI)

Key points and features

  • UDDI is like business registry for storing web service via WSDL
  • UDDI can be described as the middle broker between the Service Provider exposing the web service and Consumer/Client wanted to consume the service
  • Typically, service provider registers the WSDL in the business directory from where the clients can discover it and later can consume the service
  • UDDI is a W3C & IETF recommendation
  • In simple terms, it is similar to yellow pages of web services available

Note: Practically, it is least used as the provider after web service development shares the WSDL URL location and later clients use this URL (http/https) to access and consume the service

Simple Object Access Protocol (SOAP)

Key points and features

  • SOAP is a communication protocol used for Web Service interaction
  • It is similar or look-a-like XML, but SOAP format is fixed. We will discuss SOAP format/structure shortly after covering these key points
  • Generally, web service exchanges message (request/response) using SOAP XML over HTTP transport protocol
  • It is platform-independent and language-independent
  • It is a W3C recommendation

SOAP Structure

  • SOAP envelope: translates normal XML document to SOAP message and it is a root element. This envelope contains two child elements namely mandatory body element and an optional header element
  • SOAP header: This optional element sometime contains application-specific information for the web service exposed like UsernameToken for security purpose
  • SOAP body: This is mandatory element of the SOAP envelope and contains the request information/message for the recipient/client
  • SOAP fault: This is used to report errors and child element of SOAP body, if present. Mostly we can see fault on the response message as either web service returns well-constructed response message or soap-fault

SOAP_EnvelopeSource: Team BenchResources.net

XML Schema Definition (XSD)

Key points and features

  • XML Schema Definition or in short XSD defines structure of an XML document
  • More powerful than DTD (Document Type Definition)
  • Generally in WSDL, XSD are imported/included depending on the targetNamespace for Type element
  • When used for message exchange (request/response), then it comes handy to validate incoming request or outgoing response and relevant errors can be raised for validation
  • XSD’s are extensible, means one XSD can be imported/included on to other XSD i.e.; re-use
  • It is a W3C recommendation

More Jargons

  • Endpoint
  • Skeleton and Stub

References

Happy Coding !!
Happy Learning !!

Oracle WebLogic 12c installation steps
Introduction to SOAP web service - A JAX-WS specification