The ruleset APIMatic uses to validate WSDL documents.
APIMatic validates WSDL v1.1 documents against the ruleset below. These include rules defined by the standard as well as additional checks APIMatic enforces for better output.
When <import> is used for including external documents in a WSDL file, it must specify a location of the external document using the location attribute. The value of this attribute must be a non-empty, absolute URI that points to a valid accessible document. If the location details are not available, the components from the imported file will not be loaded during import/transformations in APIMatic.
WSDL_V002
supported-import-document-format
Error
When <import> is used for including an external document in a WSDL file, the external document referenced this way must either be a valid WSDL file or an XML schema document. Other formats are not supported.
The WSDL document must consist of at least one <message> definition nested as a child element directly under the root <definitions> element. Service operations are expected to exchange data and in a WSDL document, the structure of the input and output messages of these operations are defined using the <message> elements.
A WSDL document must consist of at least one <portType> definition nested as a child element directly under the root <definitions> element. A port type serves as an interface definition, specifying the available service operations and their associated input and output messages. Without the <portType>, therefore, there would be no way to define the operations that the service exposes.
WSDL_V201
required-port-type-name
Error
When a port type is defined using the <portType> element, it must also specify a non-empty name for itself using the name attribute which uniquely identifies it in a WSDL document.
WSDL_V202
at-least-one-port-type-operation
Warning
A port type, as an interface definition, must specify a set of operations supported by the web service and their associated input and output messages. This means that in a WSDL document a <portType> element must consist of at least one child <operation> element definition nested inside it.
WSDL_V203
required-port-type-operation-name
Error
When an <operation> element is defined inside a port type, it must also specify a non-empty name for itself using the name attribute.
WSDL_V204
non-empty-port-type-operation
Error
Each <operation>, within a port type, should define at least one of the following child elements: <input>, <output>, or <fault>. These elements describe the messages associated with the operation, such as the input data, output data, or any potential error messages (faults).
A WSDL document must consist of at least one <binding> definition nested as a child element directly under the root <definitions> element. The <binding> element describes the concrete protocol and data format specifications for accessing the operations defined in the <portType>. It establishes the connection between the abstract interface defined by the <portType> and the actual implementation details, such as the communication protocol and message format. Without the <binding>, there would be no way to determine how to interact with the service.
WSDL_V401
required-binding-name
Error
When a binding is defined using the <binding> element, it must also specify a non-empty name for itself using the name attribute which uniquely identifies it in a WSDL document.
WSDL_V402
required-binding-type
Error
A <binding> element must specify the name of the <portType> it needs to concretely define, using the type attribute. This helps establish the connection between the abstract interface defined by the <portType> and the actual implementation details, such as the communication protocol and message format, in the binding.
WSDL_V403
pre-defined-binding-type
Error
A <binding> element must specify the name of the <portType> it needs to concretely define, using the type attribute. The value of this attribute must match exactly with the name of a pre-defined <portType> element defined directly under the root <definitions> element.
WSDL_V404
required-binding-operation-name
Error
When an <operation> element is defined inside a binding, it must also specify a non-empty name for itself using the name attribute. This name must match with the name of an operation in the <portType> element which is referenced by the binding using the type attribute.
A port defines an individual endpoint by specifying a single address for a binding. In a WSDL document, the <port> element helps define this port and the binding information must be linked to it by specifying the name of a pre-defined <binding> element using the binding attribute.
WSDL_V601
pre-defined-port-binding
Error
A <port> element must specify the name of the <binding> it specifies an address for, using the binding attribute. The value of this attribute must match exactly with the name of a pre-defined <binding> element defined directly under the root <definitions> element.
When a service is defined using the <service> element, it must also specify a non-empty name for itself using the name attribute which uniquely identifies it in a WSDL document.
WSDL_V651
at-least-one-service-port
Warning
The <service> element must contain at least one <port> child element. In a WSDL document the <port> element, when used within a <service>, allows you to define specific endpoints or bindings associated with the service. It contains details such as the endpoint address and the binding used for that endpoint without which it will be harder to know how to call the service.
The provided WSDL document must not contain any syntax/semantic issues and use only valid XML. Each property in the file must have a type or value as defined in the standard.