0

我在 PHP 上创建 SoapServer 时遇到问题。

Soap 客户端开发人员向我发送这样的 xml:

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

我在描述这个的 WSDL 中创建了 xsd 模式:

<xsd:schema …&gt;
    <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>

我使用 php SoapServer 类作为服务器。我打印了它发送给我的对象。我看到了:

stdClass Object ( [subtag] => )

为什么我没有得到属性值?

4

0 回答 0