Hi all,
I am trying to write a Python consumer for Sage CRM using their Web Services interface. I am using SOAPpy as Python SOAP library (not married to it, was easy to install on Ubuntu so went with it).
Managed to fetch the WSDL using the Proxy and executed the logon method exposed by Sage CRM.
from SOAPpy import *
proxy = WSDL.Proxy('http://192.168.0.3/MATE/eware.dll/webservice/webservice.wsdl')
It returns a session object which sort of looks like
SOAPpy.Types.structType result at 151924492: {'sessionid': '170911104429792'}
Now I am trying to use Sage CRM's queryrecord method to query the data, and that returns
Fault SOAP-ENV:Server: No active usersession detected
Reading the documentation reveals that I have to send back to the session id that recd. when I logged in back with each requests.
According to the Sage documentation I have to send it back as such
SID = binding.logon("admin", "");
binding.SessionHeaderValue = new SessionHeader();
binding.SessionHeaderValue.sessionId = SID.sessionid;
Any ideas how to do append this to the headers using SOAPpy?
Any pointers will be greatly appreciated.