Querying WSDL with ?wsdl

You can interrogate web services using ?wsdl.

A web service client can send an HTTP GET request with a ?wsdl query string to an IBM® Integration Bus web service, and receive a representation of the WSDL that was used to configure the input node that provides the endpoint for the service. You can do this only for input nodes that use HTTP and not JMS transport. The protocol of the HTTP GET request must match the protocol of the flow; therefore if the flow uses SSL, the HTTP GET request must begin https://.

The client starts by sending a simple ?wsdl query and retrieves the complete WSDL definition by following a chain of referenced imports or includes. For example, if the web service endpoint is http://localhost:7800/test1, the initial client request is:

GET http://localhost:7800/test1?wsdl

This request returns the top-level WSDL service definition, which might include imports for further sections of the WSDL definition. For example, if the returned WSDL has a line:

<wsdl:import ... location="http://localhost:7800/test1?wsdl=wsdl0"/>

then the client sends a corresponding request to retrieve that section of the WSDL:

GET http://localhost:7800/test1?wsdl=wsdl0

One or more WSDL sections can also have imports for XML Schema data, for example:

<xsd:import ... schemaLocation="http://localhost:7800/test1?xsd=xsd0"/>

The client again sends a corresponding request to retrieve that data:

GET http://localhost:7800/test1?xsd=xsd0
Only semantically correct references can be followed:
  • <wsdl:import> elements that are immediate children of wsdl:definition elements
  • <xsd:import> and <xsd:include> elements that are immediate children of xsd:schema elements
where wsdl is a shorthand (namespace prefix) for http://schemas.xmlsoap.org/wsdl/, and xsd is a shorthand for http://www.w3.org/2001/XMLSchema. A request made to a URI from an element which superficially looks like an <import> or <include>, for example, an element in a comment, results in a SOAP Fault being returned. Only the simple ?wsdl query string, and subsequent queries that exactly match those queries specified in semantically valid imports and includes, result in data being returned.

The WSDL definition returned is logically equivalent to the deployable WSDL in the IBM Integration Toolkit, with inline schemas externalized. It might not be physically identical to the original imported WSDL definition. Although a SOAPInput is configured with a specific WSDL binding, the WSDL returned also includes other bindings that are not used by the flow if these were part of the original WSDL definition that was imported.