Jose,
It looks like something has changed with the web service endpoint you were
connecting to. It seems to be returning HTML instead of valid SOAP for a
response. You might check with whomever maintains the web service or test
the endpoint using another SOAP client tool like SoapUI to see if the
problem is with your script or with the service.
Good luck.
- Chris
On Mon, Aug 20, 2012 at 4:23 AM, jose soares <jose.soares(a)sferacarta.com>wrote:
Hi all,
I do not understand why since yesterday this script has stopped working...
------------------------------**------------------------------
from suds.client import Client
from suds.transport.http import HttpAuthenticated
from lxml import etree
import logging
logging.basicConfig(level=**logging.DEBUG)
from suds.xsd.doctor import ImportDoctor, Import
imp =
Import('http://schemas.**xmlsoap.org/soap/encoding/<http://schemas...
')
d = ImportDoctor(imp)
url = "https://servizicner.regione.**emilia-romagna.it/parixgate/**
services/gate?wsdl<https://servizicner.regione.emilia-romagna.it/parixgate/services/gate?wsdl>
"
username = 'pippo' #myusername
password = 'pluto' #mypassword
t = HttpAuthenticated(username=**username, password=password)
client = Client(url, transport=t, doctor=d )
result =
client.service.**RicercaImpresePerCodiceFiscale**(codice_fiscale='02286200346',
switch_control='', user=username, password=password)
------------------------------**------------------------------
Traceback (most recent call last):
File "/home/jose/buildout/bin/**python", line 74, in <module>
execfile(__file__)
File "test_parix.py", line 25, in <module>
result =
client.service.**RicercaImpresePerCodiceFiscale**(codice_fiscale='02286200346',
switch_control='', user=username, password=password)
File "/home/jose/buildout/eggs/**suds-0.4-py2.6.egg/suds/**client.py",
line 542, in __call__
return client.invoke(args, kwargs)
File "/home/jose/buildout/eggs/**suds-0.4-py2.6.egg/suds/**client.py",
line 602, in invoke
result = self.send(soapenv)
File "/home/jose/buildout/eggs/**suds-0.4-py2.6.egg/suds/**client.py",
line 643, in send
result = self.succeeded(binding, reply.message)
File "/home/jose/buildout/eggs/**suds-0.4-py2.6.egg/suds/**client.py",
line 678, in succeeded
reply, result = binding.get_reply(self.method, reply)
File
"/home/jose/buildout/eggs/**suds-0.4-py2.6.egg/suds/**bindings/binding.py",
line 146, in get_reply
replyroot = sax.parse(string=reply)
File "/home/jose/buildout/eggs/**suds-0.4-py2.6.egg/suds/sax/**parser.py",
line 136, in parse
sax.parse(source)
File "/home/jose/buildout/eggs/**PyXML-0.8.4-py2.6-linux-x86_**
64.egg/_xmlplus/sax/**expatreader.py", line 109, in parse
xmlreader.IncrementalParser.**parse(self, source)
File "/home/jose/buildout/eggs/**PyXML-0.8.4-py2.6-linux-x86_**
64.egg/_xmlplus/sax/xmlreader.**py", line 123, in parse
self.feed(buffer)
File "/home/jose/buildout/eggs/**PyXML-0.8.4-py2.6-linux-x86_**
64.egg/_xmlplus/sax/**expatreader.py", line 220, in feed
self._err_handler.fatalError(**exc)
File "/home/jose/buildout/eggs/**PyXML-0.8.4-py2.6-linux-x86_**
64.egg/_xmlplus/sax/handler.**py", line 38, in fatalError
raise exception
xml.sax._exceptions.**SAXParseException: <unknown>:2:0: junk after
document element
----------------------
In "/home/jose/buildout/eggs/**suds-0.4-py2.6.egg/suds/**bindings/binding.py"
at line 146, in get_reply:
(Pdb) print reply
<h1>gate</h1>
<p>Hi there, this is an AXIS service!</p>
<i>Perhaps there will be a form for invoking the service here...</i>
What does that mean?
j
______________________________**_________________
suds mailing list
suds(a)lists.fedoraproject.org
https://admin.fedoraproject.**org/mailman/listinfo/suds<https://admin....