Closed oranges13 closed 6 years ago
Ah, I see the problem... if a path is not set we generate a cache file based on the WSDL URL. If we assume that the option cache_wsdl_path should be a directory and not a specific file, then append the cache file name to the end (as we do if the option is not set below), would that suffice?
In library/SSRS/Soap/NTLM.php we create a different cache file for each WSDL URL:
$options['cache_wsdl_path'] = $tmpDir . DIRECTORY_SEPARATOR . md5($wsdl) . '.wsdl';
Yeah, that would be great behavior! Unfortunately I don't have complete access to the server so I have to manually set the path to a writable dir, but that seems to want a specific file, not a directory.
I've made this change and tagged v1.0.13, could you give it a go and let me know? cache_wsdl_path should be the base path now, with a file being generated for each endpoint.
Working great. I am able to define my connector globally in my controller. Thanks!
If you set the
cache_wsdl_path
because you don't have access to the temp dir on your web server, the cached WSDL is used even if it does not apply to the request you are making.Example:
You'll receieve the error
Function ("LoadReport") is not a valid method for this service
whereLoadReport
is whatever the subsequent action you are attempting to take is. This is because the WSDL has been cached and it is not refreshed between actions.The same would occur if you redefined the object but use the same cache path between different requests.
I was hoping to be able to define the connection once and reuse it for all the requests I had to make, rather than redefining the SSRS\Report object every time. Is there a way to have this thing automatically download new WSDL when the action has changed?