我對服務器端的東西非常陌生。我需要設置一個簡單的server.php來接收XML請求。解析XML請求
我甚至不知道如何從這開始。我習慣於從表單中正常的Post/Get變量。
這裏是什麼,我聽的,並需要以迴應的例子:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<authenticate xmlns="http://someplace.someplace.com/">
<strUserName xsi:type="xsd:string">username</strUserName>
<strPassword xsi:type="xsd:string">password</strPassword>
</authenticate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
顯然有一個用戶名/密碼,我可以看到裏面。
驗證用戶/密碼很容易,但我該如何解析?
http://php.net/manual/en/class.soapserver.php –