From: Charles M. <cm...@in...> - 2005-01-31 18:05:11
|
I tried that and I get a convoluted error: TypeError: Classless struct didn't get dictionary Is there anyway to use the 'op_ns' kwarg in combination with something else to make this work? Here is the full error: In [26]: x = ZSI.ServiceProxy('MutDBService.wsdl', tracefile=sys.stdout, use_wsdl=1) In [27]: x.mutationsForGene('test') DEBUG: Response Failed to generate -- only support soapenc:Array restrictions --------------------------------------------------------------------------- exceptions.TypeError Traceback (most recent call last) /home/cmoad/public_html/mooney/<console> /usr/lib/python2.3/site-packages/ZSI/ServiceProxy.py in __call__(self, *args, **kwargs) 290 self.callinfo = callinfo 291 self.parent = weakref.ref(parent) 292 293 def __call__(self, *args, **kwargs): --> 294 return self.parent()._call(self.__name__, *args, **kwargs) /usr/lib/python2.3/site-packages/ZSI/ServiceProxy.py in _call(self, name, *args, **kwargs) 87 request = Any(oname=name) 88 binding.Send(url=uri, opname=None, obj=args, ---> 89 nsdict=self._nsdict, soapaction=soapAction, requesttypecode=request) 90 return binding.Receive(replytype=response) 91 /usr/lib/python2.3/site-packages/ZSI/client.py in Send(self, url, opname, obj, nsdict, soapaction, **kw) 184 sw.serialize(kw['_args'], tc) 185 else: --> 186 sw.serialize(obj, tc, typed=0) 187 sw.close() 188 soapdata = s.getvalue() /usr/lib/python2.3/site-packages/ZSI/writer.py in serialize(self, pyobj, typecode, root, **kw) 72 if root in [ 0, 1 ]: 73 kw['attrtext'] = ' SOAP-ENC:root="%d"' % root ---> 74 typecode.serialize(self, pyobj, **kw) 75 return self 76 /usr/lib/python2.3/site-packages/ZSI/TCcompound.py in serialize(self, sw, pyobj, inline, name, attrtext, **kw) 151 def serialize(self, sw, pyobj, inline=None, name=None, attrtext='', **kw): 152 if inline or self.inline: --> 153 self.cb(sw, pyobj, **kw) 154 else: 155 objid = '%x' % id(pyobj) /usr/lib/python2.3/site-packages/ZSI/TCcompound.py in cb(self, sw, pyobj, name, **kw) 175 d = pyobj 176 if TypeCode.typechecks and type(d) != types.DictType: --> 177 raise TypeError("Classless struct didn't get dictionary") 178 for what in self.ofwhat: 179 v = d.get(what.aname) TypeError: Classless struct didn't get dictionary Joshua Boverhof wrote: > I wonder if you're not specifying "use_wsdl=True". By default this > parameter is False. > > -josh > > > Charles Moad wrote: > >> Is ServiceProxy still unable to handle wsdl's with defined >> targetNamespaces. SOAPpy.WSDL.Proxy works, but I am trying to migrate >> to ZSI as it seems to be becoming the preferred API. >> >> Thanks, >> Charlie >> >> ZSI Request: >> <mutationsForGene> >> <SOAP-ENC:string id="405b1720">brca1</SOAP-ENC:string> >> </mutationsForGene> >> >> SOAPpy Request: >> <ns1:mutationsForGene xmlns:ns1="sdans" SOAP-ENC:root="1"> >> <v1 xsi:type="xsd:string">brca1</v1> >> </ns1:mutationsForGene> >> >> ZSI Error: >> FaultException: Method Not Found >> >> _________________________________ Mon Jan 31 09:37:41 2005 RESPONSE: >> Server: <a href="http://pywebsvcs.sf.net">SOAPpy 0.11.6</a> (Python >> 2.3.4) >> Date: Mon, 31 Jan 2005 14:37:27 GMT >> Content-type: text/xml; charset="UTF-8" >> Content-length: 651 >> >> <?xml version="1.0" encoding="UTF-8"?> >> <SOAP-ENV:Envelope >> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" >> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" >> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >> xmlns:xsd="http://www.w3.org/1999/XMLSchema"> >> <SOAP-ENV:Body> >> <SOAP-ENV:Fault SOAP-ENC:root="1"> >> <faultcode>SOAP-ENV:Client</faultcode> >> <faultstring>Method Not Found</faultstring> >> <detail xsi:type="xsd:string">mutationsForGene : exceptions.KeyError >> <traceback object at 0x404f2dc4></detail> >> </SOAP-ENV:Fault> >> </SOAP-ENV:Body> >> </SOAP-ENV:Envelope> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >> Tool for open source databases. Create drag-&-drop reports. Save time >> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >> _______________________________________________ >> Pywebsvcs-talk mailing list >> Pyw...@li... >> https://lists.sourceforge.net/lists/listinfo/pywebsvcs-talk > > > > |