0

我在使用 PHP 调用 SOAP 客户端时遇到问题。

我得到的 SOAP 信息是完全原始的,没有文件只是 SOAP 客户端的代码

POST /exptapi/exptsms.asmx HTTP/1.1
 Host: www.experttexting.com
  Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.experttexting.com/QueryBalance"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:xsd="http://www.w3.org/2001/XMLSchema"          xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
<QueryBalance xmlns="http://www.experttexting.com">
  <UserID>string</UserID>
  <PWD>string</PWD>
  <APIKEY>string</APIKEY>
</QueryBalance>
</soap:Body>
</soap:Envelope>
 HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:xsd="http://www.w3.org/2001/XMLSchema"    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
<QueryBalanceResponse xmlns="http://www.experttexting.com">
  <QueryBalanceResult>xml</QueryBalanceResult>
</QueryBalanceResponse>
 </soap:Body>
</soap:Envelope>

我的问题是我不知道如何处理它......我应该将它保存为什么类型的文件?

我正在使用

  <?
   $client = new soapclient("/*the file I want to call should go here but I don't know     what to do with the soap code provided*/");
 ?>
4

1 回答 1

0

我不太确定这里问的是什么......但这可能会有所帮助。

在 Web 服务描述语言 (WSDL) 上构建客户端

肥皂客户端构造函数

<?php
$client = new SoapClient("https://www.experttexting.com/exptapi/exptsms.asmx?WSDL");
?>
于 2013-10-13T22:44:14.983 回答