Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in wsdl2py related to <wsdl:part> #75

Open
ngnpope opened this issue Jan 28, 2016 · 4 comments
Open

Crash in wsdl2py related to <wsdl:part> #75

ngnpope opened this issue Jan 28, 2016 · 4 comments

Comments

@ngnpope
Copy link
Member

ngnpope commented Jan 28, 2016

Running python -m soapfish.wsdl2py -c 'http://slednev.ru/example.wsdl' results in the following crash:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/pope1ni/Sources/soapfish/soapfish/wsdl2py.py", line 121, in <module>
    main()
  File "/home/pope1ni/Sources/soapfish/soapfish/wsdl2py.py", line 112, in main
    code = generate_code_from_wsdl(xml, target, opt.use_wsa, cwd=cwd)
  File "/home/pope1ni/Sources/soapfish/soapfish/wsdl2py.py", line 84, in generate_code_from_wsdl
    use_wsa=use_wsa,
  File "/home/pope1ni/.virtualenvs/polaris/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/pope1ni/.virtualenvs/polaris/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "soapfish/templates/wsdl", line 158, in top-level template code
    def {{ operation.name }}(self, {{ inputMessage.part.element|remove_namespace }}, header=None):
  File "/home/pope1ni/.virtualenvs/polaris/lib/python2.7/site-packages/jinja2/environment.py", line 397, in getattr
    return getattr(obj, attribute)
  File "soapfish/wsdl11.py", line 53, in part
    raise ValueError('expected exactly one part', self.name, self.parts)
ValueError: ('expected exactly one part', 'GetManufacturerListMessage', [])

This issue was introduced in e04a585.

Note: This ticket is based on a problem found in flightdataservices/soapbox#23

@russian-developer
Copy link

Hello! My WSDL was incorrect. I read RFC and found several errors. After fix all work fine.

@ngnpope
Copy link
Member Author

ngnpope commented Jan 28, 2016

Can you confirm that the example at http://slednev.ru/example.wsdl is still incorrect then?

@russian-developer
Copy link

Yes! I'm didn't fix it.

@FelixSchwarz
Copy link
Member

Just wanted to mention that a different problem existed before e04a585 so no regression in functionality (even though it's clearly a bug).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants