Backend Development 9 min read

Understanding SOAP Web Services: Elements, Structure, and Example

This article explains the three core components of SOAP web services—SOAP, WSDL, and UDDI—detailing their XML structures, message envelopes, headers, faults, and providing concrete request and response examples while also comparing development approaches and the role of UDDI.

Architect
Architect
Architect
Understanding SOAP Web Services: Elements, Structure, and Example

Since 2015 the most common web service styles are REST and SOAP, with REST becoming dominant; this article concentrates on SOAP.

Web Service Three Elements

Although the term “Web Service three elements” is outdated, we use it here to clearly explain SOAP web services. The three elements are SOAP, WSDL, and optionally UDDI.

SOAP

SOAP (Simple Object Access Protocol) defines an XML‑based envelope for messages exchanged between client and server. Example request and response messages are shown below.

8698053
Y

SOAP 1.1 is used in the examples; SOAP 1.2 is similar.

XML Declaration

The first line declares the XML version and encoding.

Envelope Element

The Envelope element is the fixed root of a SOAP message and carries the namespace declaration xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" .

Body Element

The Body contains the actual request or response payload, such as the qqCheckOnline operation and its qqCode parameter.

Header Element

Some services require a Header for authentication or other metadata, illustrated with an AuthenHeader example.

Fault Element

If an error occurs, details are placed inside a Fault element, which includes faultcode , faultstring , and detail .

WSDL

WSDL is an XML document that describes the service’s available operations, parameters, data types, and namespaces, enabling automatic generation of client and server code.

Contract‑First vs Code‑First

Two development approaches exist: contract‑first, where the WSDL is written before implementation, and code‑first, where the service is built first and the WSDL is generated afterwards.

UDDI

UDDI is a registry for publishing and discovering Web Service descriptions; registration is optional and typically used only for publicly exposed services.

Conclusion

The article provides a basic overview of SOAP, its message structure, and related specifications, acknowledging that the author has limited hands‑on experience and encouraging further exploration.

backend developmentXMLWeb ServicesSOAPUDDIWSDL
Architect
Written by

Architect

Professional architect sharing high‑quality architecture insights. Topics include high‑availability, high‑performance, high‑stability architectures, big data, machine learning, Java, system and distributed architecture, AI, and practical large‑scale architecture case studies. Open to ideas‑driven architects who enjoy sharing and learning.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.