From: Jaie W. <jai...@gm...> - 2008-11-04 02:07:04
|
Hi, I'm having an issue with a type I have defined for my response in my wsdl. One of the elements in my response is an xsd:list, which is just a list of strings seperated by space. Here is the definition of the element: <xsd:element name="linkedapplications" type="tnsb:linkedApplicationsList"/> <xsd:simpleType name="linkedApplicationsList"> <xsd:annotation> <xsd:documentation></xsd:documentation> </xsd:annotation> <xsd:list> <xsd:simpleType> <xsd:restriction base="xsd:string"></xsd:restriction> </xsd:simpleType> </xsd:list> </xsd:simpleType> I then run: wsdl2py -b file.wsdl And it auto generates my stubs. Then testing the service it works fine if the <linkedapplications> element is empty. But if it contains any values, such as <linkedapplications>value1</linkedapplications> or <linkedapplications>value1 value2</linkedapplications> It throws the following error: Traceback (most recent call last): resp = port.registerUserOrAddToGroup(req) File "generatedServices_client.py", line 41, in registerUserOrAddToGroup response = self.binding.Receive(registerUserOrAddToGroupResponse.typecode) File "build/bdist.cygwin-1.5.25-i686/egg/ZSI/client.py", line 536, in Receive return _Binding.Receive(self, replytype, **kw) File "build/bdist.cygwin-1.5.25-i686/egg/ZSI/client.py", line 461, in Receive reply = self.ps.Parse(tc) File "build/bdist.cygwin-1.5.25-i686/egg/ZSI/parse.py", line 326, in Parse return how.parse(self.body_root, self) File "build/bdist.cygwin-1.5.25-i686/egg/ZSI/TCcompound.py", line 196, in parse value = what.parse(c_elt, ps) File "build/bdist.cygwin-1.5.25-i686/egg/ZSI/TC.py", line 1672, in parse return self.text_to_data(v, elt, ps) File "build/bdist.cygwin-1.5.25-i686/egg/ZSI/TC.py", line 1643, in text_to_data v.append(self.itemTypeCode.text_to_data(item, elt, ps)) AttributeError: 'NoneType' object has no attribute 'text_to_data' Is the definition of xsd:list allowed to by empty or do I have to specify enumerations? I have seen examples that allow non enumerated xsd:list types. Any help would be appreciated. Cheers, Jaie |