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) で構築する

SOAP クライアント コンストラクタ

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