[Rslib-talk] Type token in namespace http://www.w3.org/2001/XMLSchema not found
Status: Alpha
Brought to you by:
gweis
From: Nathan D. <dav...@gm...> - 2009-08-26 02:08:43
|
Hello, First of all, I want to thank the RSL developer(s) for the work they've done. I've had problems with other web services libraries, like SOAPpy, which RSL seems to handle just fine. Keep up the good work! I'm trying to call the web service described by https://voltage-pp-0000.poc5.vspilot.org/vibesimple/wsdl. I'm using RSL 0.2.1 with the following code to invoke the ProtectCreditCardNumber function: import rsl.wsdl.wsdl wsdl_url = "https://voltage-pp-0000.poc5.vspilot.org/vibesimple/wsdl" wsdl = rsl.wsdl.wsdl.loadWSDL(wsdl_url) proxy = wsdl.getProxy() proxy.ProtectCreditCardNumber("123456789", "user", None, "UserPassword", \ "password") When I run this, however, I get the following exception: KeyError: 'Type token in namespace http://www.w3.org/2001/XMLSchema not found' I believe this is because of the 4th parameter. It's type, AuthMethod, is defined in the WSDL as follows: <xsd:simpleType name="AuthMethod"> <xsd:restriction base="xsd:token"> <xsd:enumeration value="UserPassword"/> <xsd:enumeration value="SharedSecret"/> <xsd:enumeration value="Certificate"/> <xsd:enumeration value="AuthToken_HMAC_SHA1"/> </xsd:restriction> </xsd:simpleType> Am I doing something wrong, or is this a bug/limitation in RSL? The exception stacktrace is as follows: Traceback (most recent call last): File "protectcc_example.py", line 8, in <module> print proxy.ProtectCreditCardNumber("123456789", "user", None, "UserPassword", "password") File "build/bdist.linux-x86_64/egg/rsl/soap11/proxy.py", line 109, in __call__ File "build/bdist.linux-x86_64/egg/rsl/soap11/proxy.py", line 130, in serialize File "build/bdist.linux-x86_64/egg/rsl/soap11/serializer.py", line 125, in serialize File "build/bdist.linux-x86_64/egg/rsl/xsd/serializer.py", line 67, in serialize File "build/bdist.linux-x86_64/egg/rsl/xsd/serializer.py", line 129, in serialize File "build/bdist.linux-x86_64/egg/rsl/xsd/serializer.py", line 199, in _serialize File "build/bdist.linux-x86_64/egg/rsl/xsd/serializer.py", line 169, in _serialize File "build/bdist.linux-x86_64/egg/rsl/xsd/serializer.py", line 156, in _serialize File "build/bdist.linux-x86_64/egg/rsl/xsd/component.py", line 189, in encode File "build/bdist.linux-x86_64/egg/rsl/xsd/component.py", line 275, in encode File "build/bdist.linux-x86_64/egg/rsl/xsd/component.py", line 247, in _getbasecontent File "build/bdist.linux-x86_64/egg/rsl/xsd/schema.py", line 248, in getType KeyError: 'Type token in namespace http://www.w3.org/2001/XMLSchema not found' Thanks, Nathan Davis |