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

wsdl2py with imported xsd fails #92

Closed
franzem opened this issue Nov 3, 2016 · 4 comments
Closed

wsdl2py with imported xsd fails #92

franzem opened this issue Nov 3, 2016 · 4 comments

Comments

@franzem
Copy link

franzem commented Nov 3, 2016

I am using wsdl2py to generate the wsdl classes from a wsdl that imports three separate .xsd files.

The generated file doesn't parse:

in python2.7:

    class AccNumEx(__name__ + '.BusinessRuleEx'):
TypeError: Error when calling the metaclass bases
    str() takes at most 1 argument (3 given)

in python3.4:

   class AccTypeEx(__name__ + '.BusinessRuleEx'):
TypeError: str() argument 2 must be str, not tuple

As an example, the full generated class looks like this, but it seems to have done this for all the .xsd files.

class AccNumEx(__name__ + '.BusinessRuleEx'):
    INHERITANCE = xsd.Inheritance.EXTENSION

the __name__ + '.class' doesn't seem to be valid python in either 2/3. I assume this is an attempt to make some kind of namespace separation?

@ngnpope
Copy link
Member

ngnpope commented Nov 3, 2016

Hi @franzem,

Are you using the latest commit in the master branch? Also, do you have example *.wsdl and *.xsd files that you can upload for us to test against?

You are quite correct that this is generating invalid code. I have seen this issue before, but it has been a while...

Thanks,

Nick

@franzem
Copy link
Author

franzem commented Nov 3, 2016

Hi Nick,

yes, used latest master. wsdl attached,

thanks for your quick response and help!

wsdl.zip

@iurisilvio
Copy link
Contributor

I wrote a related broken test in the past #72 and @pope1ni make it work, but the extension with an imported parent wasn't tested.

The children must known the parent types, so I had to propagate known_types. #93

I tested @franzem wsdl and it worked. It has just an small error with unknown xsd.PositiveInteger, but it is another issue.

@iurisilvio
Copy link
Contributor

Removed the label waiting for additional information.

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