Note that there are some explanatory texts on larger screens.

plurals
  1. POSuds: Type not found on response
    primarykey
    data
    text
    <p>I'm having a hard time getting a python SOAP client based on suds to parse a response: the client is constructed correctly and parses the WSDL just fine. As far as I can see there are no imports in the WSDL, so this doesn't seem like a typical <code>ImportDoctor</code> issue.</p> <p>Relevant bits from the WSDL:</p> <pre><code> &lt;xsd:complexType name="getFontsRequest"&gt; &lt;xsd:sequence&gt; &lt;xsd:element name="UserID" type="xsd:int" maxOccurs="1" minOccurs="1"&gt;&lt;/xsd:element&gt; &lt;xsd:element name="TAWSAccessKey" type="xsd:string" maxOccurs="1" minOccurs="1"&gt;&lt;/xsd:element&gt; &lt;/xsd:sequence&gt; &lt;/xsd:complexType&gt; &lt;xsd:complexType name="getFontsResponse"&gt; &lt;xsd:sequence&gt; &lt;xsd:element name="UserID" type="xsd:int"&gt;&lt;/xsd:element&gt; &lt;xsd:element name="Status" type="xsd:string"&gt;&lt;/xsd:element&gt; &lt;xsd:element name="Fonts" type="tns:FontType[]"&gt;&lt;/xsd:element&gt; &lt;/xsd:sequence&gt; &lt;/xsd:complexType&gt; &lt;xsd:complexType name="FontType"&gt; &lt;xsd:sequence&gt; &lt;xsd:element name="ID" type="xsd:int"&gt;&lt;/xsd:element&gt; &lt;xsd:element name="Name" type="xsd:string"&gt;&lt;/xsd:element&gt; &lt;/xsd:sequence&gt; &lt;/xsd:complexType&gt; </code></pre> <p>My Code:</p> <pre><code> 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) </code></pre> <p>The last line throws this exception:</p> <pre><code>... 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/, )' </code></pre> <p>My understanding is that the webservice returns an array of <code>FontType</code> objects (i.e. <code>FontType[]</code>), as specified in the <code>getFontResponse</code> method, but fails to define the <code>FontType[]</code> type, and merely describes <code>FontType</code>.</p> <p>Any help to resolve this would be greatly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload