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

Avoid collision ComplexTypes Type name and resolve it. #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

soh335
Copy link
Contributor

@soh335 soh335 commented Nov 16, 2020

Hi, it's still idea codes and I'm not good at soap. But I want to listen maintainers opinions. So I created p-r.

Some wsdl has same ComplexType name in different namespace schemas.
So currently we export it with syntax error (Request redeclared in this block), because we export all ComplexTypes to file as flat.

So this code found collision names, and rename it with number suffix.

    <wsdl:types>
        <xs:schema xmlns:ns1="xxx" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="vvv">
            <xs:complexType name="Request">
                <xs:sequence>
                          .....
                </xs:sequence>
            </xs:complexType>
        </xs:schema>
        <xs:schema xmlns:ns2="xxx" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="zzz">
            <xs:complexType name="Request">
                <xs:sequence>
                          .....
                </xs:sequence>
            </xs:complexType>
        </xs:schema>
        <xs:schema xmlns:ns1="vvv" xmlns:ns2="zzz"  attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="yyy">
            <xs:element name="do1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="param0" nillable="true" type="ns1:Request"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="do2">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="param0" nillable="true" type="ns2:Request"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    </wsdl:types>

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

Successfully merging this pull request may close these issues.

2 participants