IConnectorAccess XML Representation

The IConnectorAccess implementation shows up as a new task, NativeAccess, in the current ScreenConnectorAccessImpl.

For details about Attachmate interfaces, see Javadocs for Attachmate Interfaces.

The following is a pseudo XML schema and a description of its use:

Input Document

Note Usually, only one of screenCount or settleTime would be included in the XML document. Both are included here for information only.
<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">
  <xsd:element name="ScreenInputs" maxOccurs="1">
    <xsd:complexType>
      <xsd:element name="Command" type="xsd:integer" minOccurs="0" maxOccurs="1"> 
        <xsd:complexType>
          <xsd:attribute name="commandValue" type="xsd:integer"/> 
          <xsd:attribute name="screenCount" type="xsd:integer"/> 
          <xsd:attribute name="settleTime" type="xsd:integer"/> 
          <xsd:attribute name="cursorRow" type="xsd:integer"/> 
          <xsd:attribute name="cursorColumn" type="xsd:integer"/> 
          <xsd:attribute name="currentPage" type="xsd:integer"/> 
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="Field" minOccurs="0" maxOccurs="unbounded">
        <xsd:complexType>
          <xsd:attribute name="id" type="xsd:integer"/> 
          <xsd:attribute name="text" type="xsd:string"/> 
        </xsd:complexType>
      </xsd:element>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
Type Name Description Occurrence
Element ScreenInputs Input screen section 0–1
Element Command Command record entry 0–1
Attribute commandValue Host command constant 1
Attribute screenCount Number of records to receive before returning the screen 0–1
Attribute settleTime Host screen settle time 0–1
Attribute cursorRow Command cursor row address 0–1
Attribute cursorColumn Command cursor column address 0–1
Attribute currentPage Command page address 0–1
Element Field field record entry 0–*
Attribute id Identifier for tracking fields from input to output 1
Attribute text Field text 1

Output Document

<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">
  <xsd:element name="ScreenOutputs" maxOccurs="1">
    <xsd:complexType>
      <xsd:element name="Screen" maxOccurs="1">
        <xsd:complexType>
          <xsd:attribute name="screenName" type="xsd:string"/> 
          <xsd:attribute name="hostType" type="xsd:string"/> 
          <xsd:attribute name="rowCount" type="xsd:integer"/> 
          <xsd:attribute name="colCount" type="xsd:integer"/> 
          <xsd:attribute name="pageCount" type="xsd:integer"/> 
          <xsd:attribute name="cursorRow" type="xsd:integer"/> 
          <xsd:attribute name="cursorColumn" type="xsd:integer"/> 
          <xsd:attribute name="currentPage" type="xsd:integer"/> 
          <xsd:attribute name="fieldCount" type="xsd:integer"/> 
          <xsd:attribute name="charAttrib" type="xsd:long"/> 
          <xsd:attribute name="hostFlags" type="xsd:integer"/> 
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="Field" maxOccurs="unbounded">
        <xsd:complexType>
          <xsd:attribute name="id" type="xsd:integer"/> 
          <xsd:attribute name="startRow" type="xsd:integer"/> 
          <xsd:attribute name="startCol" type="xsd:integer"/> 
          <xsd:attribute name="endRow" type="xsd:integer"/> 
          <xsd:attribute name="endCol" type="xsd:integer"/> 
          <xsd:attribute name="page" type="xsd:integer"/> 
          <xsd:attribute name="attributes" type="xsd:long"/> 
          <xsd:attribute name="length" type="xsd:integer"/> 
          <xsd:attribute name="text" type="xsd:string"/> 
        </xsd:complexType>
      </xsd:element>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
Type Name Description Occurrence
Element ScreenOutputs Output screen section 1
Element Screen Screen record entry 1
Attribute screenName Screen name, if recognized 0–1
Attribute hostType Type of host connection 1
Attribute rowCount Number of rows on the screen ;1
Attribute colCount Number of columns on the screen 1
Attribute pageCount Number of pages being sent 1
Attribute cursorRow Cursor row 1
Attribute cursorColumn cursor column 1
Attribute currentPage Current page 1
Attribute fieldCount Number of fields on the screen 1
Attribute charAttribute Character attributes as a series of hex strings 0–1
Attribute hostFlags Host Status flag ;1
Element Field Field record entry 1–*
Attribute id Identifier for tracking fields from output to input 1
Attribute startRow Field starting row 1
Attribute startCol Field starting column 1
Attribute endRow Field ending row 1
Attribute endCol Field ending column 1
Attribute page Field page address 1
Attribute attributes Field attributes as hex string 0–1
Attribute length field length as defined on host 1
Attribute text Field text 0–1

Usage

The standard execution sequence for all connectors is to execute the selected task with an input document, then get the output document. Items that appear zero times are optional and fields that are not included in the input document are assumed unchanged.

Some typical operations include:

Error Reporting

IConnectorAccess.execute throws ConnectorAccessException that contains the error message as a localized string. The following errors are currently defined (with English examples):

Error Description Circumstances
E_PARSING_METADATA "Error parsing meta data. {error message}" Format of the meta data was incorrect in the schema document.
E_OPENING_DOCUMENT "Error opening schema document. {error message}" Problem opening the schema document.
E_PARSING_TASKDATA "Error parsing task data. {0}" If there is an error parsing the TASKDATA (configData section of the XML file) an E_PARSING_TASKDATA is reported. For example, this error is reported if an attribute is in error or missing, or if the entire section is missing or a bad task_id is passed into the execute method. It is critical that we retrieve a correct RESOURCE_NAME from this section. This is used later to get data from the configuration object and to load an already created Task_Server if this is not the first invocation of execute.
E_PARSING_INPUT "Input data parsing error. {error message}" If there is a problem setting the inputs for the task, an E_PARSING_INPUT error is reported.
E_PARSING_OUTPUT "Output data parsing error. {error message}" If there is a problem getting the outputs for the task, an E_PARSING_OUTPUT error is reported.
E_CONFIGURE_TASKSERVER "Error configuring task server. {error message}" An E_CONFIGURE_TASKSERVER error is reported if:
  • there is a problem getting the configuration data from the configuration object.
  • an error occurs instantiating the TaskServer.
  • an error occurs when invoking TaskServer.setConfig (which re-hydrates the NavMap and NavTask objects.
  • an error occurs when invoking setInstanceInfo.
  • an error invoking TaskServer.setContext occurs.
E_EXECUTING_TASK "Error executing task. {error message}" If the execution of the task fails, an E_EXECUTING_TASK error occurs and the Task Server reports "Task execution failed".
E_FREE_TASKSERVER "Error freeing the task server. {error message}" Problem with clearing the context in the Runtime Service.
E_INVALID_TRANS_ID "Invalid transaction id" Transaction id doesn't exist in the task document.
E_CREATING_CONTEXT "Server Context is null" If there is an error invoking TaskServer.createContext, a E_CREATING_CONTEXT error is reported.
Related Topics
Bullet Using Screen Native Access, Overview
Bullet Javadocs for Attachmate Interfaces
  Attachmate