【发布时间】:2015-08-11 16:05:42
【问题描述】:
我想在 PHP 文件中发出以下 SOAP 请求,但我不确定如何实现它。有人可以解释我将如何使用它吗?
另外,如何打印存储在“LoginSuccess”中的请求结果
POST /soap/V200611.ASMX HTTP/1.1
Host: api.cvent.com
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>
<Login xmlns="http://api.cvent.com/2006-11">
<AccountNumber>string</AccountNumber>
<UserName>string</UserName>
<Password>string</Password>
</Login>
</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>
<LoginResponse xmlns="http://api.cvent.com/2006-11">
<LoginResult LoginSuccess="boolean" ServerURL="string" CventSessionHeader="string" ErrorMessage="string" xmlns="http://schemas.cvent.com/api/2006-11" />
</LoginResponse>
</soap12:Body>
</soap12:Envelope>
【问题讨论】:
标签: php xml web-services soap