用于SOAP Web服务的PHP类?

问题描述:

我正在寻找一个PHP类,它使得使用SOAP服务时很轻松。理想情况下,这样的作品:用于SOAP Web服务的PHP类?

$class = new SoapClass(); 
$class->addArgument('foo', '123'); 
$class->addArgument('bar', '123'); 
$class->url('http://example.com/services/xyz'); 

$result = $class->sendRequest(); 

$data = $result->data; 
echo "$data->count results found."; 

有什么建议吗?我确实有PHP 5.

+1

嗯...像SoapClient? (http://us2.php.net/manual/en/class.soapclient.php)当然,我不认为那个类完全“无痛”。 – Andrew 2011-03-22 17:55:34

总之,Nusoap。

http://sourceforge.net/projects/nusoap/

$client = new soapclient('http://somewhere/path/to?wsdl', true); 
$result = $client->call('method', [request array structure goes here]); 
// -- Process $result 

和例子屈指可数...

你为什么不使用本机PHP SOAP客户端?

http://php.net/manual/en/class.soapclient.php

Zend公司是另一个很好的选择(但你需要有那么Zend库)

http://framework.zend.com/manual/en/zend.soap.client.html

我最后的建议是WSO2

http://wso2.com/products/web-services-framework/php/

但是肥皂不是无痛苦的,所以不要期望那样。使用REST架构。