-
Notifications
You must be signed in to change notification settings - Fork 345
Description
So it seems the way that the SOAP driver functions is to call set_defaults() during the execute() function, this seems to be problematic for the debugging functions found here: https://fuelphp.com/docs/classes/request/soap.html
- get_request_xml
- get_request_headers
- get_response_xml
- get_response_headers
These function all require the trace option to be enabled, however, the data from these functions only gets populated AFTER the call executes! So if you try to print get_request_xml before you execute it is always null, if you call this function after execute, then the trace option gets reset on soap.php line 148 with $this->set_defaults();
Commenting out line 148 "fixes" the trace function and allows these functions to seemingly work properly, however, I am not sure why you would want to call set_defaults after a request is executed enough. Perhaps you are calling execute() multiple times in a row ... but i would think you would still change the function and the parameter or headers that need to change before making the next couple calls?
Test case
$soap = Request::forge('https://api.cvent.com/soap/V200611.asmx?WSDL', 'soap');
$soap->set_function('Login');
$soap->set_option('trace', true);
$soap->set_option('connection_timeout', 45);
$soap->set_params([[
'AccountNumber' => '123456',
'UserName' => 'TestAccount',
'Password' => 'thisCantBeCorrect',
]]);
$soap->execute();