を使用してボディ要素これは私のSOAP XMLドキュメントです:は石鹸を照会しようとすると:XPathの
HTTP/1.1 200 OK
Date: Mon, 12 Mar 2012 15:42:41 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 424
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<LoginResponse xmlns="http://localhost/SPFService/">
<LoginResult>
<Reply xmlns="">
<SessionID>cdfbe607-59b1-4912-ae54-2190f1b7c7dd
</SessionID>
</Reply>
</LoginResult>
</LoginResponse>
</soap:Body>
</soap:Envelope>
は今、私はセッションID要素のTextNode値にアクセスする必要があります。
$this->dom->loadXML($response);
$this->xpath = new \DOMXPath($this->dom);
ここで、$ responseは上記のxmlを含む文字列です。
問題は、私が唯一"/soap:Envelope"
と"/soap:Envelope/soap:Body"
を照会することができます。私が"/soap:Envelope/soap:Body/LoginResponse"
を照会しようとすると、空のDOMNodeList
が得られます。この混乱をどのようにデバッグするのですか?