摘要 |
A method and apparatus for converting different interface protocol messages. The method comprises: acquire, according to a source function interface command, a source interface protocol message, determine a target message class, and determine, according to the source interface protocol message, an object instance of a source message class; determine, according to the object instance of the source message class and a name of the target message class, a structural type of the target message class, and invoke a pre-set conversion function establishing a mapping relationship with structural types of message classes; and the conversion function searches, according to a name of the source message class and the name of the target message class, a pre-set message conversion configuration file for a corresponding conversion pair, and converts, according to the found conversion pair, the source interface protocol message into a target interface protocol message. Compared with a relevant mode of converting different interface protocol messages, the technical solution simplifies a procedure of converting different interface protocol messages, reduces the workload of converting different interface protocol messages, and improves the efficiency of converting different interface protocol messages. |