【发布时间】:2013-11-18 12:51:56
【问题描述】:
您好,我正在尝试使用 soap 将我的 xml 发布到一个带有 URL http://stageserv.interswitchng.com/uat_quicktellerservice/QuickTeller.svc?wsdl 的 Web 服务的函数“SendBillPaymentAdvice”,但我不断收到我的 xml 格式不正确的错误。尝试了这么多格式,但它不会只是工作!
如何正确地将我的 xml 发布到函数中。以下是我的摘录:
$xmlData=<<<DATA
<?xml version="1.0" encoding="utf-8" ?>
<BillPaymentAdvice>
<Amount>10000</Amount>
<PaymentCode>1***</PaymentCode>
<CustomerId>080***9</CustomerId>
<CustomerEmail>luvysols@gmail.com</CustomerEmail>
<TerminalId>3****01</TerminalId>
<RequestReference>123456789</RequestReference>
</BillPaymentAdvice>
DATA;
$wsdl = 'http://stageserv.interswitchng.com/uat_quicktellerservice/QuickTeller.svc?wsdl';
$client = new SoapClient($wsdl)
$result = $client->SendBillPaymentAdvice($xmlData);
谢谢!
【问题讨论】:
标签: php xml web-services soap wsdl