skip to main content
Corticon Server: Integration & Deployment Guide : Decision Service versioning and effective dating : Invoking a Decision Service by version number : Specifying a version in a SOAP request message
 

Try Corticon Now
Specifying a version in a SOAP request message
In the CorticonRequest complexType, notice:
<xsd:attribute name=decisionServiceTargetVersion use=optional type=xsd:decimal /
In order to invoke a specific Major.Minor version of a Decision Service, the Major.Minor version number must be included as a value of the decisionServiceTargetVersion attribute in the message sample, as shown above.
As the use attribute indicates, specifying a Major.Minor version number is optional. If multiple Major.Minor versions of the same Decision Service Name are deployed simultaneously and an incoming request fails to specify a particular Major Version number, then Corticon Server will execute the Decision Service with highest version number.
If multiple instances of the same Decision Service Name and Major version number are deployed and an incoming request fails to specify a Minor version number, then Corticon Server will execute the live Decision Service with highest Minor version number of the Major version. For example, if you have 2.1, 2.2, and 2.3, and you specify 2, your request will be applied as 2.3. Note that this applies to LIVE Decision Services and not TEST Decision Services: they require a Major.Minor version.
Note: Refer to Service contract examples for full details of the XML service contracts supported (XSD and WSDL).
Let's try a few invocations using variations of the following message:

<CorticonRequest xmlns="urn:decision:tutorial_example"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
decisionServiceName="skydiver4_noDates"
decisionServiceTargetVersion="1.0">
<WorkDocuments>
<Person id="Person_id_1">
<age>30</age>
<skydiver>false</skydiver>
<ssn>111-11-1111</ssn>
</Person>
</WorkDocuments>
</CorticonRequest>
Copy this text and save the file with a useful name such as Request_noDates_1.0.xml in a local folder.
Run testServerAxis and then choose command 130 to execute the request. After it runs, you are directed to the output folder to see the result, which look like this:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:CorticonResponse xmlns:ns1="urn:decision:tutorial_example" xmlns="urn:decision:tutorial_example" decisionServiceName="skydiver4_noDates" decisionServiceTargetVersion="1.0">
<ns1:WorkDocuments>
<ns1:Person id="Person_id_1">
<ns1:age>30</ns1:age>
<ns1:riskRating>low</ns1:riskRating>
<ns1:skydiver>false</ns1:skydiver>
<ns1:ssn>111-11-1111</ns1:ssn>
</ns1:Person>
</ns1:WorkDocuments>
<ns1:Messages version="1.0">
<ns1:Message>
<ns1:severity>Info</ns1:severity>
<ns1:text>A person 35 years old or younger is rated as low risk.</ns1:text>
<ns1:entityReference href="#Person_id_1" />
</ns1:Message>
</ns1:Messages>
</ns1:CorticonResponse>
</soapenv:Body>
</soapenv:Envelope>
Note that the age stated is 35, which is what we defined version 1.0 of the Decision Service. This should be no surprise – we specifically requested version 1.0 in our request message. Corticon Server has honored our request. .
Let's prove the technique by editing the request message to specify another version:

<CorticonRequest xmlns="urn:decision:tutorial_example"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
decisionServiceName="skydiver4_noDates"
decisionServiceTargetVersion="2.0">
<WorkDocuments>
<Person id="Person_id_1">
<age>30</age>
<skydiver>false</skydiver>
<ssn>111-11-1111</ssn>
</Person>
</WorkDocuments>
</CorticonRequest>
The only edit is to change the version from 1.0 to 2.0. Now execute the test using command 130.

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:CorticonResponse xmlns:ns1="urn:decision:tutorial_example" xmlns="urn:decision:tutorial_example" decisionServiceName="skydiver4_noDates" decisionServiceTargetVersion="2.0">
<ns1:WorkDocuments>
<ns1:Person id="Person_id_1">
<ns1:age>30</ns1:age>
<ns1:riskRating>low</ns1:riskRating>
<ns1:skydiver>false</ns1:skydiver>
<ns1:ssn>111-11-1111</ns1:ssn>
</ns1:Person>
</ns1:WorkDocuments>
<ns1:Messages version="2.0">
<ns1:Message>
<ns1:severity>Info</ns1:severity>
<ns1:text>A person 45 years old or younger is rated as low risk.</ns1:text>
<ns1:entityReference href="#Person_id_1" />
</ns1:Message>
</ns1:Messages>
</ns1:CorticonResponse>
</soapenv:Body>
</soapenv:Envelope>

Corticon Server has handled our request to use version 2.0 of the Decision Service. The age threshold of 45 is our hint that version 2.0 was executed.