NuSoap-debugging?

Author Message

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 (the)

Tuesday 20 February 2007 2:29:01 pm

You could use eZ publish'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

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Nicklas Lundgren

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!

Best regards,
/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 20:54:03
Script start
Timing: Jan 18 2025 20:54:03
Module start 'layout'
Timing: Jan 18 2025 20:54:03
Module start 'content'
Timing: Jan 18 2025 20:54:03
Module end 'content'
Timing: Jan 18 2025 20:54:03
Script end

Main resources:

Total runtime0.6547 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.9297152.6094
Module start 'layout' 0.00710.0030 741.539139.4141
Module start 'content' 0.01010.6431 780.9531608.9922
Module end 'content' 0.65320.0015 1,389.945312.1875
Script end 0.6546  1,402.1328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5078160.0002
Check MTime0.00130.1988160.0001
Mysql Total
Database connection0.00110.163110.0011
Mysqli_queries0.586889.6277620.0095
Looping result0.00060.0915600.0000
Template Total0.620294.720.3101
Template load0.00230.346420.0011
Template processing0.618094.390420.3090
Template load and register function0.00010.018210.0001
states
state_id_array0.00100.157310.0010
state_identifier_array0.00080.120220.0004
Override
Cache load0.00190.2914380.0001
Sytem overhead
Fetch class attribute can translate value0.00070.111430.0002
Fetch class attribute name0.00120.186170.0002
XML
Image XML parsing0.00400.614830.0013
class_abstraction
Instantiating content class attribute0.00000.002080.0000
General
dbfile0.00741.1256310.0002
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs