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