Call Method Description
Request format: XML document with the RK7Query root element, which contains
- Either one RK7CMD tag
- Or multiple RK7Command tags
- Or several RK7Command2 tags
Preferred method:
- All newly created integrations should use RK7Command2
- With all existing integrations, you should evaluate the possibility of switching to the use of RK7Command2
- This will allow:
- To simplify log analysis — a request and a response will be located in one file, no need to search for them separately
- To simplify work for systems that execute multiple requests: response analysis can be based on response data. That is, GetRefData requests — to update the references cache, SaveOrder requests — to the order processing queue.
RK7CMD: Single Command Execution
- Historically the first way to call commands in XML Interface r_keeper 7
- Cons (at the time of implementation):
- Does not allow multiple commands to be executed in one batch
- Example:
Request
<?xml version="1.0" encoding="utf-8"?> <RK7Query> <RK7CMD CMD="GetSystemInfo"/> </RK7Query>
Response
<?xml version="1.0" encoding="utf-8"?> <RK7QueryResult ServerVersion="7.6.5.92" XmlVersion="246" NetName="OA-01-REPS-000" Status="Ok" CMD="GetSystemInfo" ErrorText="" DateTime="2020-02-12T20:28:51" WorkTime="0" Processed="1"> <SystemInfo SystemTime="3790700931046" ReqSysVer="2" NetName="OA-01-REPS-000" ProcessID="4788"/> </RK7QueryResult>
RK7Command: Command Batch Execution
Development of RK7CMD to fulfill multiple queries
- Pros:
- Allows executing multiple commands in one batch
- Cons (at the time of implementation):
- The response document does not contain the original request: log analysis and analysis on the side of third-party systems is difficult
- Example:
Request
<?xml version="1.0" encoding="utf-8"?> <RK7Query> <RK7Command CMD="GetSystemInfo"/> <RK7Command CMD="GetRefData" RefName="EventList"/> </RK7Query>
Response
<?xml version="1.0" encoding="utf-8"?> <RK7QueryResult ServerVersion="7.6.5.92" XmlVersion="246" NetName="OA-01-REPS-000" Status="Ok" Processed="2"> <CommandResult CMD="GetSystemInfo" Status="Ok" ErrorText="" DateTime="2020-02-12T20:39:02" WorkTime="0"> <SystemInfo SystemTime="3790701542539" ReqSysVer="2" NetName="OA-01-REPS-000" ProcessID="4788"/> </CommandResult> <CommandResult CMD="GetRefData" Status="Ok" ErrorText="" DateTime="2020-02-12T20:39:02" WorkTime="16"> <RK7Reference DataVersion="3" Name="EVENTLIST"> <Items> <Item Ident="1000282" GUIDString="{8F611272-83CD-43B3-8AFF-B58C47956083}" Code="1" Name="SH5 price import"/> </Items> </RK7Reference> </CommandResult> </RK7QueryResult>
RK7Command2: Command Batch Execution (recommended)
- Development of RK7Command in order to save information about the original request in the response, in the SourceCommand tag
- Pros:
- Allows getting the source text of the request in the resulting XML, which in its turn
- Simplifies log analysis — a request and a response in one place
- Simplifies parsing on the side of the external system
- Allows getting the source text of the request in the resulting XML, which in its turn
- Cons (at the time of implementation)
- Increasing traffic. Possible solutions:
- HTTP: Usage of GZIP
- RK7XML.DLL compresses the data itself
- Increasing XML parsing time. Possible solutions:
- To investigate increase: if it is critical, DO NOT use this option
- In the case of not quite correct XML parsing code, code adaptation will be required:
- For example, if nodes were selected by numbers/lists of child objects
- Increasing traffic. Possible solutions:
- Example:
Request
<?xml version="1.0" encoding="utf-8"?> <RK7Query> <RK7Command2 CMD="GetSystemInfo"/> <RK7Command2 CMD="GetRefData" RefName="EventList"/> </RK7Query>
Response
<?xml version="1.0" encoding="utf-8"?> <RK7QueryResult ServerVersion="7.6.5.92" XmlVersion="246" NetName="OA-01-REPS-000" Status="Ok" Processed="2"> <CommandResult CMD="GetSystemInfo" Status="Ok" ErrorText="" DateTime="2020-02-12T20:43:58" WorkTime="0"> <SourceCommand> <RK7Command2 CMD="GetSystemInfo"/> </SourceCommand> <SystemInfo SystemTime="3790701838355" ReqSysVer="2" NetName="OA-01-REPS-000" ProcessID="4788"/> </CommandResult> <CommandResult CMD="GetRefData" Status="Ok" ErrorText="" DateTime="2020-02-12T20:43:58" WorkTime="15"> <SourceCommand> <RK7Command2 CMD="GetRefData" RefName="EventList"/> </SourceCommand> <RK7Reference DataVersion="3" Name="EVENTLIST"> <Items> <Item Ident="1000282" GUIDString="{8F611272-83CD-43B3-8AFF-B58C47956083}" Code="1" Name="SH5 price import"/> </Items> </RK7Reference> </CommandResult> </RK7QueryResult>