![]() |
Type Not Found error on python soap call using suds library - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: Type Not Found error on python soap call using suds library (/thread-7044.html) |
Type Not Found error on python soap call using suds library - wellborn - Dec-19-2017 i'm converting my php code into python code here is my php code $info = new StdClass(); $info->username = 'myUsername'; //Required $info->password = 'myPassword'; require_once 'nusoap.php'; $client = new nusoap_client('http://myWebServiceAddress?wsdl', true); $str = $client->call("login", array('loginRequest' => $info)); $contextinfo = new stdClass(); $contextinfo->data = new stdClass(); $contextinfo->data->entry = array('key' => 'SESSION_ID', 'value' => $str['return']); $requestinfo = new StdClass(); $requestinfo->refNumList = "RefNum"; $str1 = $client->call("verifyTransaction", array('context' => $contextinfo, 'verifyRequest' => $requestinfo)); echo $str1['return']['verifyResponseResults']['amount']; and when i convert it to python i got this error Exception Value: Type not found: 'value' Exception Location: venv\lib\site-packages\suds\mx\literal.py in start, line 87 here is my python code wsdl_url = WebServiceUrl schema_url = 'http://www.type-applications.com/character_set/' schema_import = Import(schema_url) schema_doctor = ImportDoctor(schema_import) client = Client(url=wsdl_url, doctor=schema_doctor) info = { "username":int(username), "password":int(password) } params = { 'loginRequest':info } result = client.service.login(**params) entry = { 'key':str('SESSION_ID'), 'value':str(result) } contextinfo = { 'data':entry } requestinfo = { "refNumList":RefNum } params1 = { 'context':contextinfo, 'verifyRequest':requestinfo } result = client.service.verifyTransaction(**params1)first soap calls works well ('client.service.login(**params)') and result has true value but i got error on second soap call(client.service.verifyTransaction(**params1)) i used suds.Client for soap call and used suds.xsd.doctor for fixing type not found error, but doctor cant fix it for me RE: Type Not Found error on python soap call using suds library - micseydel - Dec-19-2017 You need to provide runnable code (which includes imports) and the full stack trace. |