我将肥皂发送到服务器时遇到问题,得到错误并且无法获取详细信息:
if (is_soap_fault($result)) {
trigger_error("SOAP Fault: (faultcode: {$result->faultcode},
faultstring: {$result->faultstring})", E_ERROR);
}
因为它没有显示任何内容
我的代码如下:
$customer = $rowDopravaLang['id_customer'];
$postcode = $rowDopravaLang['postcode'];
$address1 = $rowDopravaLang['address1'];
$dic = $rowDopravaLang['vat_number'];
$ico = $rowDopravaLang['dni'];
$city = $rowDopravaLang['city'];
$firstname = $rowDopravaLang['firstname'];
$lastname = $rowDopravaLang['lastname'];
$phone_mobile = $rowDopravaLang['phone_mobile'];
if($rowDopravaLang['company'] != '' OR $rowDopravaLang['company'] != NULL) {
$company = $rowDopravaLang['company'];
} else {
$company = $firstname.' '.$lastname;
}
$dorucovaci = (object)array('ISOZeme' => 'CZ',
'Obec' => $city,
'Okres' => $city,
'PSC' => $postcode,
'Ulice' => $address1);
$zakaznik = (object)array('AdresaSidlo' => $dorucovaci, 'DIC' => $dic, 'IC' => '', 'FakturacniAdresa' => $dorucovaci,
'Firma' => $company, '4W-1' => $firstname, 'Prijmeni' => $lastname, 'Telefon' => $phone_mobile, 'Kniha' => 'Eshop', 'NazevFirmy' => $company, 'TypKontaktu' => 'Organizace', 'referent'=>'xxx');
$url="http://xx.xxx.xx.yy:y/xxxx/Altus.COM.V12.BasicServices.Kontakty?wsdl";
$config = array('trace' => 1, 'exceptions' => 0);
$service = new SoapClient($url, $config);
$result = $service->VlozitKontakt(array("kontakt" => $zakaznik));
已添加对象的结果是: