WsdlToPhp / PackageGenerator

Generates a PHP SDK based on a WSDL, simple and powerful, WSDL to PHP
https://providr.io
MIT License
418 stars 73 forks source link

when xs:group tag include an array , it will generate wrong #284

Open ypptidyce18786 opened 1 year ago

ypptidyce18786 commented 1 year ago

Describe the bug when xs:group tag include an array , it will generate wrong the xs:group tag example:

<xs:group name="BaseBookingTravelerInfoA">
        <xs:sequence>
            <xs:element ref="BookingTravelerName"/>
            <xs:element ref="DeliveryInfo" minOccurs="0" maxOccurs="999"/>
            <xs:element ref="PhoneNumber" minOccurs="0" maxOccurs="999"/>
            <xs:element ref="Email" minOccurs="0" maxOccurs="999"/>
            <xs:element ref="LoyaltyCard" minOccurs="0" maxOccurs="999"/>
            <xs:element ref="DiscountCard" minOccurs="0" maxOccurs="9"/>
        </xs:sequence>
    </xs:group>
image

I copied the contents of the xs: group tag to the place referenced by xs: group, and then it can be generated normally.

ypptidyce18786 commented 1 year ago

PhoneNumber should be generate an array.

but now, it generated an Object

mikaelcom commented 1 year ago

Hi, thanks for your report. I'll look to it as soon as possible. My first tought is that the native PHP SoapClient class does not fetch the BaseBookingTravelerInfoA details from the group so it does not consider its elements as part of the parent tag. The generator does not take care of analyzing all the tags to reconstruct each element definition... but I might be wrong.

keep in touch