Forums / Developer / NuSoap-debugging?
Nicklas Lundgren
Tuesday 20 February 2007 1:31:06 pm
Hi,I have just started to try out the NuSoap extension, and so far it looks really promising.
However, I intend to create some quite complicated methods to be called.So my question is - how to debug these methods? (preferably locally, on the server).
Of course, its not a big problem as long as the methods is HelloWorld-like, but I would really like to be able to use the ordinary ez-debug opportunities, not just see the results in the soap client...
Thanks in advance!
Best regards,/Nicklas
Nicklas Lundgren, Managing Director Novitell AB, Sweden
kracker
Tuesday 20 February 2007 2:29:01 pm
You could use Exponential's logging functionality! Here is a snippet to get you started
include_once('lib/ezfile/classes/ezlog.php'); /*! \public Writes a message $message to a given file name $name and directory $dir for logging */ $l = new eZLog(); $message='test'; $I->write( $message, $logName = 'common.log', $dir = 'var/log' );
//kracker
<i>KMK - Neva Stop...</i>
Member since: 2001.07.13 || http://ezpedia.se7enx.com/
Bruce Morrison
Tuesday 20 February 2007 3:48:43 pm
Hi Nicklas
krackers messages shows how you can write to your oen log file.
Howevere if you want to create eZ debug messages you should use the eZDebug class:http://pubsvn.ez.no/doxygen/classeZDebug.html
The simplest way to use it is
eZDebug::writeDebug( "This should never happen" );
No need to include lib/ezutils/classes/ezdebug.php as it's included for all requests in index.php
CheersBruce
My Blog: http://www.stuffandcontent.com/ Follow me on twitter: http://twitter.com/brucemorrison Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish
Wednesday 21 February 2007 12:43:49 am
Hi Kracker and Bruce.
Thanks to you both for your suggestions. I think I will use both of them in this case.
Also, I have now created a script to run the soap-functions locally as the main problem with calling nusoap-methods is that on the client-side of things, there is only a reply, or maybee a soap fault code. No way to examine debug messages or logs from php there.
Now things are working fine so, again, thanks for your help!