2016-04-13 27 views
0

でWADLサービスを消費しますか?は、私は私はそれをどのように行うことができます</p> <pre><code>wadl: http://domain.com/application.wadl method: checkInfo </code></pre> <p>WADLサービスからメソッドを呼び出し、パラメータを渡す必要がPHP

//Wsdl - Soap: I need to do this but with a wadl service 

$wsdl = new SoapClient('http://domain.com/application?wsdl'); 

$wsdl->__call('checkInfo',array('data'=> '')); 
//or 
$wsdl->checkInfo(array('data'=> '')); 

ありがとうございました!!!!

答えて

0

あなたはSOAPサーバーを使用してこれを行うことができます。

class MyClass{ 
    function checkInfo() { 
     return "Hello"; 
    } 

} 
//when in non-wsdl mode the uri option must be specified 
$options=array('uri'=>'http://localhost/'); 
//create a new SOAP server 
$server = new SoapServer(NULL,$options); 
//attach the API class to the SOAP Server 
$server->setClass('MyClass'); 
//start the SOAP requests handler 
$server->handle(); 

をし、それを使用します。

<?php 
/* 
* PHP SOAP - How to create a SOAP Server and a SOAP Client 
*/ 

$options = array('location' => 'http://localhost/server.php', 
        'uri' => 'http://localhost/'); 
//create an instante of the SOAPClient (the API will be available) 
$api = new SoapClient(NULL, $options); 
//call an API method 
echo $api->checkInfo(); 
?> 

のコード例here

から
関連する問題

 関連する問題