0
我有一个SOAP客户端代码来从elit公司获得汽车零件,但我有一个奇怪的结果。Soap失败函数响应
object(stdClass)[225]
public 'return' =>
object(stdClass)[226]
public 'unitPrice' => float 0
public 'vat' => int 0
我的PHP代码:
getItem function must have an array parameters:
7 => string 'struct getItem {
string company;
string login;
string password;
string activeItemNo; }
public function demo($piesa)
{
$wsdl = 'http://icelit02.elit.cz:7606/InterCompany-1.10.0/BuyerService?wsdl';
$opts = array('http' => array('protocol_version' => '1.0'));
$context = stream_context_create($opts);
$client = new SoapClient($wsdl, array('stream_context' => $context));
var_dump($client->__getFunctions());
var_dump($client->__getTypes());
$response=$client->__call('getItem', array(array('company'=>'ELIT_RO', 'login'=>'autocomplet15', 'password'=>'elena10', 'activeItemNo'=>'M043 22 00')));
dd($response);
}
你可以直接调用'$ client-> getItem($ arguments)'。你也可以显示'__getFunctions'结果吗?请注意在此处显示您的密码。 –
我相信,你不应该使用嵌套数组,只是简单的数组作为一个基础:'$ response = $ client-> getItem(array('company'=>'ELIT_RO','login'=>'login','password '=>'password','activeItemNo'=>'M043 22 00'));' –
Honza Haering:如果我直接调用getItem,我收到一个错误:Function not found ...或类似的东西。 –