Is there a way to debug a SOAP service that we publish ideally with integration into an IDE allowing me to step through the code.
Is there a way to debug a SOAP service that we publish ideally with integration into an IDE allowing me to step through the code.
I've done debugging with Eclipse IDE, Zend Debugger and soapUI but I guess this will work with XDebug as well.
Select your soap server endpoint in Eclipse IDE and then "Debug As" | "PHP Web Application". For me the endpoint is soapserver.php. This will start your default web browser with debugging parameters added to URL. So the URL will be something like
http://localhost/myproject/soapserver.php?debug_host=127.0.0.1&debug_fastfile=1&start_debug=1&debug_port=10137&use_remote=1&original_url=http%3A%2F%2Flocalhost%2Fmyproject%2Fsoapserver.php&ZRayDisable=1&send_sess_end=1&debug_stop=1&debug_start_session=1&debug_no_cache=1621452020087&debug_session_id=1000
Now copy the URL from browser to soapUI's request. Start the request and debugger will stop the execution of php code at the first line of soapserver.php. You may set other breakpoints too.
The only downside of this approach is that the debugger is alive only as long as the request is alive. When timeout happens the debugger will stop too. I've tried to change the request timeout in soapUI with no luck. Probably one needs to change timeout of php's soapserver but I've no idea how to do it.