0

I have problem with creating a SoapServer on PHP.

The Soap client developers send me xml like this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="…">
    <SOAP-ENV:Body>
        <ns1:…>
            <tag>
                <subtag attr1="value1" attr2="value2" attr3="value3"/>
            </tag>
        </ns1:…>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I created the xsd schema in a WSDL which describes this:

<xsd:schema …>
    <xsd:element name="tag" type="tp_tag"/>
    <xsd:complexType name="tp_tag">
        <xsd:sequence>
            <xsd:element name="subtag" maxOccurs="unbounded">
                <xsd:complexType>
                    <xsd:attribute name="attr1" type="xsd:string" use="required"/>
                    <xsd:attribute name="attr2" type="xsd:string" use="required"/>
                    <xsd:attribute name="attr3" type="xsd:string" use="required"/>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>

I used the php SoapServer class for a server. I printed the object that it sent me. And I saw:

stdClass Object ( [subtag] => )

Why didn't I get the attribute values?

Andrew
  • 18,680
  • 13
  • 103
  • 118

0 Answers0