Define & Validate APIsValidation Rulesets

WSDL Rulesets

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.

WSDL Validation

Validation checks performed on a WSDL v1.1 file.

PropertyValue
Ruleset IDwsdl-validation
Code prefixWSDL_V
TypeValidation
Default severityError
Rule systemSemantic
Rules18

Imports

CodeRuleSeverityWhat it checks
WSDL_V001required-import-locationErrorWhen <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_V002supported-import-document-formatErrorWhen <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.

Messages

CodeRuleSeverityWhat it checks
WSDL_V100at-least-one-messageWarningThe 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.

Port Types

CodeRuleSeverityWhat it checks
WSDL_V200at-least-one-port-typeWarningA 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_V201required-port-type-nameErrorWhen 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_V202at-least-one-port-type-operationWarningA 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_V203required-port-type-operation-nameErrorWhen an <operation> element is defined inside a port type, it must also specify a non-empty name for itself using the name attribute.
WSDL_V204non-empty-port-type-operationErrorEach <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).

Bindings

CodeRuleSeverityWhat it checks
WSDL_V400at-least-one-bindingWarningA 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_V401required-binding-nameErrorWhen 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_V402required-binding-typeErrorA <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_V403pre-defined-binding-typeErrorA <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_V404required-binding-operation-nameErrorWhen 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.

Ports

CodeRuleSeverityWhat it checks
WSDL_V600required-port-bindingErrorA 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_V601pre-defined-port-bindingErrorA <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.

Services

CodeRuleSeverityWhat it checks
WSDL_V650required-service-nameErrorWhen 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_V651at-least-one-service-portWarningThe <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.

Miscellaneous

CodeRuleSeverityWhat it checks
WSDL_V700valid-wsdl-syntaxBlockingThe 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.

Learn more

On this page