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

Add meta-data for soapEnc arrays #9

Closed
veewee opened this issue May 26, 2023 · 0 comments · Fixed by #32
Closed

Add meta-data for soapEnc arrays #9

veewee opened this issue May 26, 2023 · 0 comments · Fixed by #32
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@veewee
Copy link
Member

veewee commented May 26, 2023

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

Currently we skip parsing of the properties for soapEnc arrays to make it more compatible with how php handles arrays.
(see SkipArrayTypePropertiesRule)
However, the array type and size information gets lost.

  <xs:complexType name="TIntegerDynArray">
      <xs:complexContent>
          <xs:restriction base="soapenc:Array">
              <xs:sequence/>
              <xs:attribute ref="soapenc:arrayType" n1:arrayType="xs:int[]" xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
          </xs:restriction>
      </xs:complexContent>
  </xs:complexType>

Results in:

[1] => Soap\Engine\Metadata\Model\Type Object
(
    [xsdType:Soap\Engine\Metadata\Model\Type:private] => Soap\Engine\Metadata\Model\XsdType Object
        (
            [name:Soap\Engine\Metadata\Model\XsdType:private] => TIntegerDynArray
            [baseType:Soap\Engine\Metadata\Model\XsdType:private] => Array
            [xmlNamespace:Soap\Engine\Metadata\Model\XsdType:private] => http://www.borland.com/namespaces/Types
            [xmlNamespaceName:Soap\Engine\Metadata\Model\XsdType:private] => ns1
            [meta:Soap\Engine\Metadata\Model\XsdType:private] => Soap\Engine\Metadata\Model\TypeMeta Object
                (
                    [isAbstract:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [default:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [docs:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [enums:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [extends:Soap\Engine\Metadata\Model\TypeMeta:private] => Array
                        (
                            [type] => Array
                            [namespace] => http://schemas.xmlsoap.org/soap/encoding/
                        )

                    [fixed:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [isAlias:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [isAttribute:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [isElementValue:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [isList:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [isNullable:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [isElement:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [isSimple:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [isLocal:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [isNil:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [minOccurs:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [maxOccurs:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [restriction:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [unions:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [use:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                    [isQualified:Soap\Engine\Metadata\Model\TypeMeta:private] =>
                )

            [memberTypes:Soap\Engine\Metadata\Model\XsdType:private] => Array
                (
                )

        )

    [properties:Soap\Engine\Metadata\Model\Type:private] => Soap\Engine\Metadata\Collection\PropertyCollection Object
        (
            [properties:Soap\Engine\Metadata\Collection\PropertyCollection:private] => Array
                (
                )

        )

)

Expectation:

  • isList -> true
  • tell it that the type is int[] (minoccurs: 0, maxOccurs unbounded)
@veewee veewee added enhancement New feature or request help wanted Extra attention is needed labels May 26, 2023
@veewee veewee closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant