当我尝试发送此请求时,我收到错误“id:0 500内部服务器错误 - SoapFault”。
我的要求:
$client = new SoapClient( 'xxx', array('trace' => 1));
$client -> soap_defencoding = 'utf-8';
$client -> decode_utf8 = FALSE;
$a = array( 'user_name' => 'xx', 'user_password' => 'xx' );
$response = $client->__soapCall( 'adeLogin', $a );
$session = get_object_vars($response)['session'];
$aCPrep = array(
'rname1' => 'Pan',
'rname2' => 'Jan',
'rname3' => 'test',
'rcountry' => 'PL',
'rzipcode' => '00-950',
'rcity' => 'Warszawa',
'rstreet' => 'ul. Kwieciska 15',
'quantity' => '1',
'rphone' => '1500-100-900',
'rcontact' => 'Antoni',
'weight' => '100',
'date' => '2012-01-01',
'references' => 'by WebAPI ',
'notes' => 'by Thomi (thest 4)',
'srv_ade' => 'asd',
'pfc' => 'Magazyn',
'sendaddr' => array( 'name1' => 'Firma z Francji', 'name2' => 'firma', 'name3' => 'firma2','country' => 'FR', 'zipcode' => '14117', 'city' => 'Arromanches', 'street' => 'Pl. du Six Juin 1944' ),
'srv_daw' => array( 'name' => '','building' => '','floor' => '','room' => '','phone' => '','altrec' => ''),
'srv_ident' => array( 'name' => '','country' => '','zipcode' => '','city' => '','street' => '','nation' => '','date_birth' => '','identity' => '','ident_doctype' => '','spages' => '','ssign' => '','sdealsend' => '','sdealrec' => ''),
'srv_ppe' => array( 'sname1' => '','sname2' => '','sname3' => '','scountry' => '','szipcode' => '','scity' => '','sstreet' => '','sphone' => '','scontact' => '','rname1' => '','rname2' => '','rname3' => '','rcountry' => '','rzipcode' => '','rcity' => '','rstreet' => '','rphone' => '','rcontact' => '','references' => '','weight' => ''),
'srv_bool' => array( 'cod' => '1', 'cod_amount' => '200', 'exw' => '0', 'rod' => '0', 'pod' => '0', 'exc' => '0','ident' => '0','daw' => '0','ps' => '0','pr' => '0','s10' => '0','s12' => '0','sat' => '0','ow' => '0','srs' => '0',),
'parcels' => array( '0' => array( 'weight' => '15', 'reference' => 'paczka duza','number' => '','srv_ade' => '', 'srv_bool' => array( 'cod' => '1', 'cod_amount' => '200', 'exw' => '0', 'rod' => '0', 'pod' => '0', 'exc' => '0','ident' => '0','daw' => '0','ps' => '0','pr' => '0','s10' => '0','s12' => '0','sat' => '0','ow' => '0','srs' => '0')))
);
$aCMsg = array( 'session' => $session, 'consign_prep_data' => $aCPrep );
$aClient = $client->__soapCall( 'adePreparingBox_Insert', $aCMsg );
我的肥皂服务器或symfony出错了吗?谁知道出了什么问题?
如何展示XML?
答案 0 :(得分:0)
来自SOAP服务器的响应 尝试
echo "REQUEST:\n".$client->__getLastRequest()."\n";
echo "RESPONSE:\n".$client->__getLastResponse()."\n";