5 # XXX: Replace with command line arguments
6 file = '@CONF_DIR@/opensrf_core.xml'
11 # Pull connection settings from <config><opensrf> section of opensrf_core.xml
12 osrf.system.System.connect(config_file=file, config_context='config.opensrf')
14 # Set up a connection to the opensrf.math service
15 session = osrf.ses.ClientSession('opensrf.math')
17 # Call one of the methods defined by the opensrf.math service
18 request = session.request(operator, operand1, operand2)
20 # Retrieve the response from the method
21 response = request.recv(timeout=2)
23 print(response.content())
25 # Cleanup request and connection resources