[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Fedora-suds-list] Re: suds.WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing <argument name>



ps - this is the documentation that leads me to think i'm calling login correctly
    https://api.verticalresponse.com/partner-wsdl/1.0/documentation.html#createList

pps - i sporatically get the error message below when calling Client(url). i delete the temp file (cache?) and then things work.
 Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-i686/egg/suds/client.py", line 109, in __init__
  File "build/bdist.linux-i686/egg/suds/wsdl.py", line 194, in __init__
  File "build/bdist.linux-i686/egg/suds/wsdl.py", line 256, in build_schema
  File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 90, in load
  File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 277, in open_imports
  File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 554, in open
  File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 572, in download
  File "build/bdist.linux-i686/egg/suds/sax/parser.py", line 134, in parse
  File "/usr/lib/python2.5/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.5/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib/python2.5/xml/sax/expatreader.py", line 211, in feed
    self._err_handler.fatalError(exc)
  File "/usr/lib/python2.5/xml/sax/handler.py", line 38, in fatalError
    raise exception
xml.sax._exceptions.SAXParseException: /tmp/suds/suds-649682136.http:10:2: mismatched tag

ppps - i apologize for the lack of plain text. and for top posting. if you need me to resend in plain text i can do that.

On Mon, Oct 5, 2009 at 11:42 PM, Lucy Mendel <lucy bilumi org> wrote:
Hi,

I'm new to suds and soap in general, so please bear with my imprecise terminology (and feel free to correct me).

Namely, the following fails inexplicably with a Missing argument server fault, yet I've supplied the exact argument requested, both as named parameters, positional parameters, **dict.

>>> from suds.client import Client
>>> url = "" href="https://api.verticalresponse.com/partner-wsdl/1.0/VRAPI.wsdl" target="_blank">https://api.verticalresponse.com/partner-wsdl/1.0/VRAPI.wsdl'
>>> client = Client(url)
>>> client.service.login(username="clay bilumi org", password="XXX", session_duration_minutes=30)
<<< python 2.6 on os X.5 >>>
No handlers could be found for logger "suds.client"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 535, in __call__
  File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 595, in invoke
  File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 630, in send
  File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 681, in failed
  File "build/bdist.macosx-10.3-fat/egg/suds/bindings/binding.py", line 235, in get_fault
suds.WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing username'

<<< python 2.5 on ubuntu 8.04 >>>
No handlers could be found for logger "suds.client"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-i686/egg/suds/client.py", line 535, in __call__
  File "build/bdist.linux-i686/egg/suds/client.py", line 595, in invoke
  File "build/bdist.linux-i686/egg/suds/client.py", line 630, in send
  File "build/bdist.linux-i686/egg/suds/client.py", line 681, in failed
  File "build/bdist.linux-i686/egg/suds/bindings/binding.py", line 235, in get_fault
suds.WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing username'

<<< ipython 2.6 on mac >>>
---------------------------------------------------------------------------
WebFault                                  Traceback (most recent call last)

/Users/lucy/sandbox/CalmProcrasDonate/procrasdonate/applib/<ipython console> in <module>()

/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc in __call__(self, *args, **kwargs)
    533                 return (500, e)
    534         else:
--> 535             return client.invoke(args, kwargs)
    536
    537     def faults(self):

/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc in invoke(self, args, kwargs)
    593                 self.method.name, timer)
    594         timer.start()
--> 595         result = self.send(msg)
    596         timer.stop()
    597         metrics.log.debug(

/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc in send(self, msg)
    628             else:
    629                 log.error(self.last_sent())
--> 630                 result = self.failed(binding, e)
    631         return result
    632

/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc in failed(self, binding, error)
    679         if status == 500:
    680             if len(reply) > 0:
--> 681                 r, p = binding.get_fault(reply)
    682                 self.last_received(r)
    683                 return (status, p)

/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/bindings/binding.pyc in get_fault(self, reply)
    233         p = unmarshaller.process(fault)
    234         if self.options.faults:
--> 235             raise WebFault(p, faultroot)
    236         return (faultroot, p.detail)
    237

WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing username'

just in case:
client.service.login(username="clay bilumi org", password="XXX", session_duration_minutes=30)
client.service.login("clay bilumi org", "XXX", 30)
d = {
'username':"clay bilumi org", 'password':"XXX", 'session_duration_minutes':3}
client.service.login(**d)

I tried to get suds to work with a different wsdl to determine whether the problem is user error. I could not find a simple soap server to point at. Maybe that is all I really need....suggestions?

I'm using revision 577 of the suds repo.

I am in communication with a VerticalResponse engineer; VerticalResponse is the company whose API I'd like to communicate with. People there have barely heard of python, though, so if I can be certain the problem is not on my end (it likely is) that would be awesome.

Thanks for your help.
I've heard excellent things about suds on stackoverflow, so keep up the good work.

Lucy.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]