An encoding service is a software component that has implemented the encoding rule and provides an interface to encoding and decoding functionality. It is an integrated part of data interchange. The encoding service is able to read the input data structure and convert the instances to an output data structure and vice versa. It is also able to read the application schema declarations and write the corresponding output data structure schema. The input data structure is defined by an application schema. The application schema is defined using concepts of the conceptual schema language. The output data structure is also described with a schema, called the data structure schema, which defines the possible content, structure and coding schemes of the output data structure. The data structure schema is described with a schema language. The encoding rule specifies conversion rules at two levels, the first is at the schema level and the second is at the instance level. At the schema level, the conversion rules define a mapping for each of the concepts defined in the application schema to corresponding concepts in the data structure schema. At the instance level the conversion rules define a mapping for each of the instances in the input data structure to corresponding instances in the output data structure. The instance conversion rules are normally deduced from the schema conversion rules.