Mismatched Tag Error
by Sammy Flarn
Hi -
I am trying to connect to an IP and get the following error. I am using
SUDS 0.3.6.
>>> client = Client(url)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.4/site-packages/suds/client.py", line 106, in
__init__
self.wsdl = Definitions(url, options)
File "/usr/local/lib/python2.4/site-packages/suds/wsdl.py", line 171, in
__init__
root = p.parse(url=url).root()
File "/usr/local/lib/python2.4/site-packages/suds/sax/parser.py", line
134, in parse
sax.parse(fp)
File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 211, in feed
self._err_handler.fatalError(exc)
File "/usr/local/lib/python2.4/xml/sax/handler.py", line 38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: /tmp/suds/suds-823874735.http:59:18:
mismatched tag
Ticket #256 --> https://fedorahosted.org/suds/ticket/256 suggested deleting
the tmp directories, but this did not help me.
Can anyone give me a suggestion on how to troubleshoot this problem?
SammyF
14 years, 7 months
suds.WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing <argument name>
by Lucy Mendel
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 = 'https://api.verticalresponse.com/partner-wsdl/1.0/VRAPI.wsdl'
>>> client = Client(url)
>>> client.service.login(username="clay(a)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(a)bilumi.org", password="XXX",
session_duration_minutes=30)
client.service.login("clay(a)bilumi.org", "XXX", 30)
d = {'username':"clay(a)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.
14 years, 7 months
Suds memory footprint
by Chris Frantz
Hello,
I would like to use suds to talk to several SOAP services, each using
the same WSDL. The wsdl file is rather large (about 500K) and
translates to about 50M of memory once parsed.
If I do this:
c1 = Client('file:myservice.wsdl)
c1.set_options(location="https://addr1/soap")
c2 = Client('file:myservice.wsdl)
c2.set_options(location="https://addr2/soap")
(etc)
Then each Client instance adds about 50M to my program's memory
footprint. Is there any way to parse the WSDL once and create
several client objects based on the already-parsed file?
A cursory inspection of the Client code suggests I might be able to
create the first Client() and then make new instances of client that
reference the wsdl, factory and sd members of the original, but
contains different Options and possibly it's own ServiceSelector.
Suggestions or comments?
--Chris
14 years, 7 months
Trunk fixed.
by Jeff Ortel
Trunk back on its feet again, r576.
I'll continue testing/fixing throughout the day.
14 years, 7 months
Trunk broken r754
by Jeff Ortel
Trunk is broken as of r574. I'll fix ASAP and post an update to the list.
14 years, 7 months