I find it difficult to load a foam-based python SOAP client to analyze the response: the client is built correctly and perfectly parses WSDL. As far as I can see, there is no import in WSDL, so this does not seem to be a typical ImportDoctor problem.
Relevant bits from WSDL:
<xsd:complexType name="getFontsRequest"> <xsd:sequence> <xsd:element name="UserID" type="xsd:int" maxOccurs="1" minOccurs="1"></xsd:element> <xsd:element name="TAWSAccessKey" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="getFontsResponse"> <xsd:sequence> <xsd:element name="UserID" type="xsd:int"></xsd:element> <xsd:element name="Status" type="xsd:string"></xsd:element> <xsd:element name="Fonts" type="tns:FontType[]"></xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="FontType"> <xsd:sequence> <xsd:element name="ID" type="xsd:int"></xsd:element> <xsd:element name="Name" type="xsd:string"></xsd:element> </xsd:sequence> </xsd:complexType>
My code is:
self.soap_client = Client(settings.WSDL_URL) self.factory = self.soap_client.factory self.service = self.soap_client.service # ... getFontsRequest = self.factory.create('getFontsRequest') getFontsRequest.UserID = settings.WS_UID getFontsRequest.TAWSAccessKey = settings.WS_KEY self.service.getFonts(getFontsRequest)
The last line throws this exception:
... File "/usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/suds/xsd/sxbasic.py", line 63, in resolve raise TypeNotFound(qref) TypeNotFound: Type not found: '(FontType[], http://www.type-applications.com/character_set/, )'
I understand that webservice returns an array of FontType objects (i.e. FontType[] ) as specified in the getFontResponse method, but cannot determine the type of FontType[] and just describes FontType .
Any help to solve this problem would be greatly appreciated.
Marco source share