Retrieving Model Information

The Configurator XML interface lets you retrieve information about a model, including:

Click to jump to top of pageClick to jump to parent topicElements and Attributes

The COP XML request may include these elements and attributes to retrieve information about a model.

CONFIGURATION MODEL_ID LOCALE MODEL_VERSION COMPILE_VERSION DECISION_POINTS ALL

The COP XML response may include these elements and attributes to return information about a model.

CONFIGURATION MODEL_ID LOCALE MODEL_VERSION COMPILE_VERSION TOTAL_PRICE DECISION_POINTS DP NM ERROR

Click to jump to top of pageClick to jump to parent topicVersion and Compile Version

The CONFIGURATION element, and its MODEL_ID, MODEL_VERSION, and COMPILE_VERSION attributes let you retrieve the model version and model compile version.

Any COP XML request must include at least the top level CONFIGURATION element, with at least the MODEL_ID and MODEL_VERSION attributes. The value for the MODEL_ID attribute must be the name of a valid model. The value for the MODEL_VERSION attribute may be a valid version number, valid partial version number, or an empty string.

Click to jump to top of pageClick to jump to parent topicLatest Version and Compile Version

The CONFIGURATION element, without a value for its MODEL_VERSION attribute, lets you retrieve the latest version and compile version for the model.

Including in the REQUEST

Causes the COP to return in the RESPONSE

The CONFIGURATION element with:

  • A valid value (model name) for the MODEL_ID attribute, and

  • An empty string as the value for the MODEL_VERSION attribute.

The CONFIGURATION element with values of:

  • The given model name for the MODEL_ID attribute.

  • The latest model version for the MODEL_VERSION attribute.

  • The latest compile version for the COMPILE_VERSION attribute.

For example:

REQUEST

RESPONSE

<CONFIGURATION MODEL_ID="Sample" MODEL_VERSION=""/>

<CONFIGURATION MODEL_ID="Sample" MODEL_⇒VERSION="1-0-0" COMPILE_VERSION="2000103⇒0-102408-606"> </CONFIGURATION>

Click to jump to top of pageClick to jump to parent topicLatest Compile Version

The CONFIGURATION element, with a valid value (full or partial version) for its MODEL_VERSION attribute lets you retrieve the latest version and compile version for the given version.

Including in the REQUEST

Causes the COP to return in the RESPONSE

The CONFIGURATION element with valid values for:

  • The MODEL_ID attribute.

  • The MODEL_VERSION attribute.

The CONFIGURATION element with values of:

  • The given model name for the MODEL_ID attribute.

  • The full, latest, given model version for the MODEL_VERSION attribute.

  • The latest compile version for the COMPILE_VERSION attribute.

For example:

REQUEST

RESPONSE

<CONFIGURATION MODEL_ID="Sample" MODEL_VERSION="1"/>

<CONFIGURATION MODEL_ID="Sample" MODEL_VERSION="1-0-0" COMPILE_VERSION="2000103⇒0-102408-606">

<CONFIGURATION MODEL_ID="Audio" MODEL_VERSION="3-1"/>

<CONFIGURATION MODEL_ID="Audio" MODEL_VERSION="3-1-0" COMPILE_VERSION="2000110⇒5-115320-323"> </CONFIGURATION>

Note. The response for any valid request always includes the full model version and compile version. You may want to include the version and compile version from the first response in all subsequent requests.

Click to jump to top of pageClick to jump to parent topicError Messages

An abnormal processing error or a request with invalid or omitted information causes the COP XML to return an error message.

Including in the REQUEST

Causes the COP XML to return in the RESPONSE

One of the following:

  • An invalid element name.

  • An invalid attribute name.

  • An invalid value for a valid attribute name.

OR omitting a required attribute

The ERROR element as a child element of the CONFIGURATION element. The ERROR element’s content is a textual description of the error.

For example:

REQUEST

RESPONSE

(An invalid element name)

<CONFIGURATION/>

<CONFIGURATION> <ERROR>com.calicotech.xml.ffInvalidChildException: Child CONFIGURATION found where CONFIGURATION required</ERROR> </CONFIGURATION>

(An invalid attribute name)

<CONFIGURATION MODEL_ID=""/>

<CONFIGURATION> <ERROR>calico.configurator.exceptions.COPException: Problem TestModel:0-0-0 not found.</ERROR> </CONFIGURATION>

(An invalid value for an attribute)

<CONFIGURATION MODEL_ID="Sample_2"/>

<CONFIGURATION> <ERROR>calico.configurator.exceptions.COPException: Problem Sample_2:0-0-0 not found.</ERROR> </CONFIGURATION>

(An invalid value for an attribute)

<CONFIGURATION MODEL_ID="Sample" MODEL_VERSION="1-1"/>

<CONFIGURATION> <ERROR>calico.configurator.exceptions.COPException: Version not found for Sample:1-1.</ERROR> </CONFIGURATION>

(Omitting the required MODEL_VERSION attribute)

<CONFIGURATION MODEL_ID="Sample"/>

<CONFIGURATION> <ERROR>calico.configurator.exceptions.COPException: Version not found for Sample:0-0-0.</ERROR> </CONFIGURATION>

Click to jump to top of pageClick to jump to parent topicDecision Points

The DECISION_POINTS element and its ALL attribute let you retrieve two different sets of decision points for the model.

Click to jump to top of pageClick to jump to parent topicAll Decision Points

The DECISION_POINTS element, with its ALL attribute set to “true" lets you retrieve every decision point for the model.

By default, including in the REQUEST the DECISION_POINTS element also includes the element’s ALL attribute with its value set to true.

REQUEST

RESPONSE

<CONFIGURATION MODEL_ID= "Sample" MODEL_⇒VERSION=""><DECISION_POINTS/> </CONFIGURATION>

<CONFIGURATION MODEL_ID="Sample" MODEL_VERSION="1-0-0" COMPILE_VERSION="20001030-102408-606"> <DECISION_POINTS ALL="true"> <DP NM="BaseSelection"/> <DP NM="HardDrivesSelection"/> <DP NM="DVDorCDRomSelection"/> <DP NM="OperatingSystemSelection"/> <DP NM="DeviceControllersSelection"/> <DP NM="MonitorsSelection"/> <DP NM="WattsDisplaySelection"/> <DP NM="ChassisSelection"/> <DP NM="PowerCordSelection"/> <DP NM="WarrantySelection"/> <DP NM="AdditionalSoftwareSelection"/> <DP NM="TravelSelection"/> <DP NM="PrimaryPurposeSelection"/> <DP NM="UserTypeSelection"/> <DP NM="SpeakersSelection"/> <DP NM="PrintersSelection"/> <DP NM="ScannersSelection"/> <DP NM="TapeBackDriveSelection"/> <DP NM="ZipDriveSelection"/> <DP NM="CDRWSelection"/> <DP NM="ModemSelection"/> <DP NM="SoundSelection"/> <DP NM="NetworkSelection"/> <DP NM="MemorySelection"/> <DP NM="VideoSelection"/> </DECISION_POINTS> </CONFIGURATION>

<CONFIGURATION MODEL_ID= "Sample" MODEL_⇒VERSION=""><DECISION_POINTS ALL="true"/> </CONFIGURATION>

Note. Either request in the example causes the COP to return in the RESPONSE the DECISION_POINTS element with its ALL attribute set to “true", and, as child elements, all of the DP elements for the model. The name of each decision point is the value of the NM attribute for each DP element.

Click to jump to top of pageClick to jump to parent topicPublic Decision Points

The DECISION_POINTS element, with its ALL attribute set to “false" lets you retrieve every public decision point for the model.

Including in the REQUEST

Causes the COP to return in the RESPONSE

The DECISION_POINTS element, with its ALL attribute set to “false."

  • The MODEL_ID attribute.

  • The MODEL_VERSION attribute.

The CONFIGURATION element with values of:

  • The DECISION_POINTS element with its ALL attribute set to “false".

  • As child elements, only the public DP elements for the model.

For example:

REQUEST

RESPONSE

<CONFIGURATION MODEL_ID="Sample" MODEL_VERSION=""> <DECISION_POINTS ALL="false"/> </CONFIGURATION>

Causes the COP to return only the public decision points for the Sample model.