PHP如何调用webservice接口?
erldy 2006-05-31 10:49:59 用PHP如何按照webservice接口已定义的格式进行调用?
POST /sendsms.asmx HTTP/1.1
Host: 172.16.18.4
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<SendSms10198 xmlns="http://172.16.18.4:8000/">
<strMobile>string</strMobile>
<intType>int</intType>
<strMsg>string</strMsg>
</SendSms10198>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<SendSms10198Response xmlns="http://172.16.18.4:8000/">
<SendSms10198Result>int</SendSms10198Result>
</SendSms10198Response>
</soap12:Body>
</soap12:Envelope>
这是给出来的说明