Bidirectional Request and Response Schemas

The Bidirectional Request and Response Schemas provide an XML-formatted set of queries and responses that can be used for bidirectional communication between applications and printers. Using these queries, applications can retrieve any printer configuration and status data that is stored in accordance with the Bidirectional Communication Schema. They can also set any writable printer properties. You can use either the IBidiSpl2::SendRecvXMLStream or the IBidiSpl2::SendRecvXMLString function to communicate with the printer.

There are several request schemas and corresponding response schemas. The formal definition of each, and an example of each, are located in the following topics:

Get Request and Response Schemas

EnumSchema Request and Response Schemas

Set Request and Response Schemas

GetWithArgument Request and Response Schemas

The root element of any request or response identifies its type. The <EnumSchema> request and response are used to retrieve a list of accessible printer properties. The <Get> and <Set> requests allow multiple queries. A <Set> "query" is simply an identification of the property to be set and the value to write to it.

Each <Query> has a schema= attribute that points to the property or property value that is being read/written. The values of these schema= attributes are paths in the tree of the Bidirectional Communications Schema.

For example, each <Get> response repeats the original set of queries and adds a result to each of them. Each <Set> response repeats the original set of "queries," but provides nothing more for queries that succeed. If any query fails for either a <Get> or <Set> request, the result is an error message.

For more information about constructing requests, see Constructing a Bidi Communications Schema Query.

For detailed information about the Bidirectional Communication Schema, see the Bidirectional Communications Schema Hierarchy and Bidi Communications Schema Reference topics.