Debugging a SOAP service using xDebug

Is there a way to debug the SOAP service that we publish ideally with integration into the IDE allowing me to execute the code.

+7
soap php xdebug
source share
1 answer

With a little inspiration from this article, I came up with a solution that allows me to call a service from SoapUI and execute the code in my IDE ( PhpStorm ).

The key is to change part of the generated WSDL, in particular the <soap:address> node. This has a location attribute to which I add ?XDEBUG_SESSION_START=netbeans-xdebug . Obviously, netbeans-xdebug should be any IDE key that you configured using the debugging environment.

I do this by capturing the WSDL before rendering it and executing preg_replace ().

 $wsdl = preg_replace('|soap:address location="(.*?)"|','soap:address location="$1' . $ide_key . '"', $wsdl ); 
+12
source share

All Articles