Debugging Server-Side Python Scripts
Most of the debugging functionality—apart the server-specific callbacks—can be used in a standard Python interpreter or (virtual) environment after the RaptorXML+XBRL Server module has been installed by using pip:
pip install –upgrade "/path/to/RaptorXML/application-folder/bin/raptorxml-version-cp37-cp37m-winversion.whl"
After installing the wheel, you should be able to use any Python IDE to debug a script. You could try to extract the main functionality into a separate function which takes an instance object. This can then be called (i) by the RaptorXML Server callbacks, or (ii) by directly executing the script with a Python interpreter.
from altova_api.v2 import xml, xsd, xbrl
# Here goes the application specific logic
# Main entry point, will be called by RaptorXML after the XML instance validation job has finished
def on_xsi_finished(job, instance):
# instance object will be None if XML Schema validation was not successful
# Main entry point, will be called by RaptorXML after the XBRL instance validation job has finished
def on_xbrl_finished(job, instance):
# instance object will be None if XBRL 2.1 validation was not successful
if __name__ == ‘__main__’:
# parse arguments and create an instance
instance = …