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 failing #109

Open
bkalantzis opened this issue May 14, 2017 · 2 comments
Open

wsdl2py failing #109

bkalantzis opened this issue May 14, 2017 · 2 comments
Assignees
Milestone

Comments

@bkalantzis
Copy link

bkalantzis commented May 14, 2017

I'm attempting to use the wsdl2py to generate client code from a wsdl file. The code generated has name+'.TheClassName' instead of the actual name in the class declerations:

class TLOGenericSearchInput(__name__ + '.TLORequestInput'):
    INHERITANCE = xsd.Inheritance.EXTENSION
    INDICATOR = xsd.Sequence
    MaximumAddresses = xsd.Element(__name__ + '.String', minOccurs=0)
    Name = xsd.Element(__name__ + '.NameBase', minOccurs=0
    Address = xsd.Element(__name__ + '.AddressBase', minOccurs=0)
    FilingNumber = xsd.Element(__name__ + '.String', minOccurs=0)
    SSN = xsd.Element(__name__ + '.String', minOccurs=0)
    FullName = xsd.Element(__name__ + '.String', minOccurs=0)
    DateOfBirth = xsd.Element(__name__ + '.Date', minOccurs=0)
    BusinessName = xsd.Element(__name__ + '.String', minOccurs=0)```

Attached is the wsdl and result it generates with python 3.5.
[wsdl_and_code.zip](https://github.com/soapteam/soapfish/files/999122/wsdl_and_code.zip)
@iurisilvio
Copy link
Contributor

We have a reordering strategy to avoid this situation, but your case is not handled properly.

xsd2py._reorder_complexTypes put types with extensions/restrictions before the other types, but your WSDL the TLORequestInput and TLOGenericSearchInput have extensions.

I'll try to improve this reordering to fix this problem.

@iurisilvio
Copy link
Contributor

I don't have a fix for it yet.

The issue here is the restriction use the namespace <xs:extension base="s0:TLORequestInput"> and I don't know how to get the namespace information. If I'm able to order based on ("http://tlo.com/", "TLORequestInput"), it'd be an easy patch.

@ngnpope ngnpope modified the milestones: 0.6.0, 0.7.0 May 12, 2021
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