Skip to content

Rework SOAP:Array encoder to support complex type items. - #37

Merged
veewee merged 1 commit into
php-soap:mainfrom
veewee:improved-soap-encoder
Feb 12, 2025
Merged

veewee merged 1 commit into
php-soap:mainfrom
veewee:improved-soap-encoder

Conversation

@veewee

@veewee veewee commented Feb 10, 2025

Copy link
Copy Markdown
Member
Q A
Type improvement
BC Break no
Fixed issues

Summary

Add support for soap:Array types with complex content:

<complexType name="Foo">
    <all>
        <element name="id" type="string" />
    </all>
</complexType>
<complexType name="ArrayOfFoo" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/">
    <complexContent>
        <restriction base="soap-enc:Array">
            <attribute ref="soap-enc:arrayType" wsdl:arrayType="tns:Foo[]"/>
        </restriction>
    </complexContent>
</complexType>
<element name="testType" minOccurs="1" maxOccurs="1" type="tns:ArrayOfFoo" />
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:tns="http://test-uri/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <tns:test>
          <testParam SOAP-ENC:arrayType="tns:Foo[2]" xsi:type="tns:ArrayOfFoo">
              <item xsi:type="tns:Foo">
                <id xsi:type="xsd:string">abc</id>
              </item>
              <item xsi:type="tns:Foo">
                <id xsi:type="xsd:string">def</id>
              </item>
          </testParam>
      </tns:test>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

@veewee
veewee merged commit 5bd6663 into php-soap:main Feb 12, 2025
veewee added a commit that referenced this pull request Oct 15, 2026
veewee/reflecta#39 adds optional_index() and optional_property(), stacked on #37. Until 1.1.0 is tagged the branch comes in through a VCS repository aliased as 1.1.0, so this cannot be merged before the constraint is back on a release.
veewee added a commit that referenced this pull request Oct 15, 2026
veewee/reflecta#39 adds optional_index() and optional_property(), stacked on #37. Until 1.1.0 is tagged the branch comes in through a VCS repository aliased as 1.1.0, so this cannot be merged before the constraint is back on a release.
veewee added a commit to veewee/encoding that referenced this pull request Oct 15, 2026
veewee/reflecta#39 adds optional_index() and optional_property(), stacked on php-soap#37. Until 1.1.0 is tagged the branch comes in through a VCS repository aliased as 1.1.0, so this cannot be merged before the constraint is back on a release.
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.

1 participant