Version numbers are specified in Web service requests as a
required namespace.
The
following statements describe how versions of the Web service interfaces affect
interaction with them:
- When the client sends a
version in its request, the server sends an API version in its response.
- The version of a client
(such as a set of Java methods generated from contacting a service) must be
compatible with the version of the Web service.
If clients contact a service whose version is incompatible with the
version in their stubs, they receive a SOAP fault. Specifically, the following
cases are possible:
- If version A is specified in
the client stubs, but version B is used in the Web service, and version B is
backward-compatible with version A, the request is processed normally without
any messages.
- If no version is specified
in the client stubs, but a version exists in the Web service, this is
interpreted as a parsing error:
Unable to parse version for
<operation_name> in namespace
<namespace_name>.
- If version A is specified in
the client stubs, but version B is used in the Web service, and version B is
not backward-compatible with version A (that is, it represents a major version
change), the Dgraph server issues an error indicating that the version used is
invalid; the Endeca Server issues an error indicating that it could not find
the specified version A in the web service WSDL available to the server.
Important: In all cases, to fix the client's incompatibility
with the current Web service version, generate new client stubs and use them
with the front-end application.
Examples of specifying the version numbers in requests
These examples illustrate how to specify the version number in
requests to various Web services. The principle for specifying the version is
the same, but the syntax differs slightly depending on the type of the Web
service.
In this example, the request is sent to the Configuration Web Service,
with specified values for major and minor versions in the namespace (3.0):
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.endeca.com/MDEX/config/services/types/3/0"
xmlns:ns1="http://www.endeca.com/MDEX/config/XQuery/2009/09">
<soapenv:Header/>
<soapenv:Body>
...
</soapenv:Body>
</soapenv:Envelope>
In this example, the request is sent to the Conversation Web Service:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.endeca.com/MDEX/conversation/3/0">
<soapenv:Header/>
<soapenv:Body>
<ns:Request>
...
</ns:Request>
</soapenv:Body>
</soapenv:Envelope>
The response also contains version numbers.