[Fedora-suds-list] Re: Soapenc: vs soap-enc: vs SOAP-ENC:?

Paul Nicolette photon3 at gmail.com
Fri Nov 6 17:43:17 UTC 2009


Matt,

Thanks for testing.  Which versions of Python, Suds and OS platform did you use?

Paul

On 11/6/09, Matt C <mcauthorn at gmail.com> wrote:
> Paul: I too was able to parse this wsdl without needing the doctor class:
>
> In [1]: url2 = 'http://njgin.state.nj.us/OIT_AddrMatch/OIT_AddrMatch?WSDL'
> In [2]: from suds.client import Client
>
> In [6]: c = Client(url2, cache = None)
> ERROR: An unexpected error occurred while tokenizing input
> The following traceback may be corrupted or invalid
> The error message is: ('EOF in multi-line statement', (129, 0))
>
> The error above ends with a stack trace for 'mismatched tag', which is
> one of the cache bugs you may run into. I simply run the same command
> again (no cache delete, etc. required):
>
> In [7]: c = Client(url2, cache = None)  <<< client object successfully
> creates now.
>
> In [8]: print c
>
> Suds ( https://fedorahosted.org/suds/ )  version: 0.3.7 GA  build:
> R580-20091016
>
> Service ( OIT_AddrMatch ) tns="urn:OIT_AddrMatch/wsdl"
>    Prefixes (2)
>       ns0 = "http://schemas.xmlsoap.org/soap/encoding/"
>       ns1 = "urn:OIT_AddrMatch/types"
>    Ports (1):
>       (OIT_AddrMatchRPCPort)
>          Methods (1):
>             getAddrMatch(ns1:AddrMatchIO AddrMatchIO_1, )
>          Types (50):
>             ns1:AddrMatchIO
>             ns0:Array
>             ns1:ArrayOfAddrMatchIO
>             ns0:ENTITIES
>
> ...Etc.
>
> So the short story: if you get that mismatched tag error, repeat the
> same command again and it should build. I got no import errors at all,
> so this should be clean aside from any cache issues.
>
> -Matt
>
> On Fri, Nov 6, 2009 at 12:05 PM, Paul Nicolette <photon3 at gmail.com> wrote:
>> Jeff,
>> Thanks for your gracious help to an embarrassed newbie.  I'm running
>> Portable Python 1.1 on Vista Home Premium with the 0.3.7 \suds tree
>> extracted to \Lib.  Using PyScripter 1.9.9.6 for IDE.
>> My code:
>>
>> from suds.client import Client
>> url = 'http://njgin.state.nj.us/OIT_AddrMatch/OIT_AddrMatch?WSDL'
>> client = Client(url)
>> print client
>>
>> With a cleared ...\temp\suds directory, I get
>>
>> [Dbg]>>>
>> Traceback (most recent call last):
>>   File "<string>", line 129, in run
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\bdb.py", line 368, in run
>>     exec cmd in globals, locals
>>   File "C:\Users\Staples\Documents\module2.py", line 3, in <module>
>>     client = Client(url)
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\client.py", line 109,
>> in
>> __init__
>>     self.wsdl = Definitions(url, options)
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\wsdl.py", line 194, in
>> __init__
>>     self.build_schema()
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\wsdl.py", line 255, in
>> build_schema
>>     self.schema = container.load()
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\xsd\schema.py", line
>> 90,
>> in load
>>     child.open_imports()
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\xsd\schema.py", line
>> 277,
>> in open_imports
>>     imported = imp.open()
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\xsd\sxbasic.py", line
>> 608, in open
>>     result = self.download()
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\xsd\sxbasic.py", line
>> 626, in download
>>     root = Parser(transport).parse(url=url).root()
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\sax\parser.py", line
>> 134,
>> in parse
>>     sax.parse(fp)
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\xml\sax\expatreader.py",
>> line
>> 107, in parse
>>     xmlreader.IncrementalParser.parse(self, source)
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\xml\sax\xmlreader.py", line
>> 123, in parse
>>     self.feed(buffer)
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\xml\sax\expatreader.py",
>> line
>> 211, in feed
>>     self._err_handler.fatalError(exc)
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\xml\sax\handler.py", line
>> 38,
>> in fatalError
>>     raise exception
>> xml.sax._exceptions.SAXParseException:
>> c:\users\staples\appdata\local\temp\suds\suds-649682136.http:10:2:
>> mismatched tag
>>
>> Looked like Ticket #256.  Not knowing better, I tried replacing the
>> suds-649682136.http tempfile with some valid(?) innocuous(?) XML and
>> making
>> it read-only:
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <body></body>
>>
>> After this change, I get
>>
>> [Dbg]>>>
>> Traceback (most recent call last):
>>   File "<string>", line 129, in run
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\bdb.py", line 368, in run
>>     exec cmd in globals, locals
>>   File "C:\Users\Staples\Documents\module2.py", line 3, in <module>
>>     client = Client(url)
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\client.py", line 109,
>> in
>> __init__
>>     self.wsdl = Definitions(url, options)
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\wsdl.py", line 194, in
>> __init__
>>     self.build_schema()
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\wsdl.py", line 255, in
>> build_schema
>>     self.schema = container.load()
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\xsd\schema.py", line
>> 92,
>> in load
>>     child.dereference()
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\xsd\schema.py", line
>> 295,
>> in dereference
>>     midx, deps = x.dependencies()
>>   File "C:\PortablePython_1.1_py2.6.1\App\lib\suds\xsd\sxbasic.py", line
>> 330, in dependencies
>>     raise TypeNotFound(self.ref)
>> suds.TypeNotFound: Type not found: '(Array,
>> http://schemas.xmlsoap.org/soap/encoding/, )'
>>
>> What would you suggest next?  (When I copied the WSDL local and changed
>> "soap-enc:" to "SOAP-ENC:" it went further but then I think it tried to
>> open
>> the real service URL as a local file and couldn't resolve the name for
>> some
>> reason ;-)
>> I could try:
>>     a clean install of Python (but which version?) and
>>     properly install a newer suds library (but would need pathetically
>> detailed instructions) and am even willing to
>>     replace my new best friend IDE with someone else (but who?), and then
>> have no idea whether I might still
>> catch:
>>     pandemic obscurebugitis.
>>>>>
>>
>>>>
>>>> Similar error when I try the mssoapinterop part of the test at
>>>> http://svn.fedorahosted.org/svn/suds/tags/release-0.3.2/tests/public.p
>>>>
>>>> <http://svn.fedorahosted.org/svn/suds/tags/release-0.3.2/tests/public.py>y.
>>>>   I get /Type not found: '(Array,
>>>> http://schemas.xmlsoap.org/soap/encoding/, )' /This WSDL uses
>>>> "soapenc:Array" syntax.
>>>
>>> Sorry, the WIKI references the wrong version of public.py here.  I've
>>> updated to point to the latest in trunk.
>>
>> Thank you sir for all your help!
>> Paul
>> _______________________________________________
>> fedora-suds-list mailing list
>> fedora-suds-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/fedora-suds-list
>>
>




More information about the suds mailing list