Ask the Expert

SOAP and WSDL work together

How do you use SOAP to communicate with WSDL? (i.e web services written in java)

    Requires Free Membership to View

SOAP and WSDL are related and complementary standards for web services, and they are typically used together.

SOAP is an XML messaging protocol. The SOAP specification describes the format and structure of an "envelope" that conveys an XML message, and it specifies how to "bind" the SOAP envelope to various communication protocols, such as HTTP. SOAP also defines some basic rules about processing the messages in a SOAP envelope.

WSDL is a service description language. It describes the interface of the service, i.e., the structure of the XML messages that the service can accept/return. WSDL also describes how those messages are encoded and indicates what protocols the service supports (e.g., SOAP over HTTP).

If you're familiar with CORBA, SOAP is like IIOP, and WSDL is like IDL. WSDL provides a programmatic description of the service. A tool can parse the WSDL and generate SOAP middleware code.

When building web services in Java, a developer typically uses a web services framework that generates the SOAP code. Popular open source web services frameworks for Java include Apache Axis2, Apache CXF, and Sun's JAX-WS reference implementation. All Java EE application servers also include a web services framework. The specific tooling used to generate the code is framework-specific:

- Apache Axis2 provides Java2WSDL and WSDL2Java tools.

- Apache CXF provides a WSDL2Java tool and supports WSDL generation from Java using annotations and a Java2WSDL tool. (Note that although the Axis2 and CXF tools have the same name, the tools are different and generate different code.)

- Sun's JAX-WS supports WSDL generation from Java using annotations and the apt and wsgen tools, and Java generation from WSDL using the wsimport tool.

All three frameworks also use configuration files for specifying runtime settings and mapping SOAP/XML constructs to Java constructs.

This was first published in July 2007

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: