eZSOAP... Generating Fault error for client

Author Message

Björn Dieding@xrow.de

Monday 02 June 2003 7:05:58 pm

I played around with the helloworld example of ezsoap.

Actually I didn't figure out how to produce custom fault messages (code&string).

I had a function similar to this(http://ez.no/sdk/ref/view/class/eZSOAPServer/)

function addNumbers( $valueA, $valueB )
{
$return = $valueA + $valueB;
settype( $return, "integer" );
return $return;
}

Whenever my $return was $return=true; or $return=false; the client programm stalled on a null object(Fatal error: Call to a member function on a non-object) on line 111 in lib/ezsoap/classes/ezsoapresponse.php

How do I get the fault thing to work(eZSOAPResponse::isFault())? Or isn't SOAPFault the right way to send custom error messages back to the client?

THX a lot Björn

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Bård Farstad

Tuesday 03 June 2003 12:58:23 am

Actually the SOAP faults only work on internal error messages for now. eZ soap does not yet support sending custom faults.

Faults is designed to send error messages like you describe.

I'm working on the SOAP interface now and it will be continually improved.

I think the system should generate a fault if you return an eZSOAPFault object from the function.

-bård

Documentation: http://ez.no/doc

Bård Farstad

Tuesday 03 June 2003 2:32:55 am

I just commited support for SOAP faults ( revision nr 2634 ).

You can now do:
function addNumbers( $valueA, $valueB )
{
if ( $valueA == 42 )
return new eZSOAPFault( "Server Error", "This does not work like expected" );

$return = $valueA + $valueB;
settype( $return, "integer" );
return $return;
}

--bård

Documentation: http://ez.no/doc

Björn Dieding@xrow.de

Tuesday 03 June 2003 3:00:12 am

I thought so too that this should be the way how it should work. Thanks for the update. I will get the lastest revision from SVN now.

Brad you are da man :-)

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Björn Dieding@xrow.de

Tuesday 03 June 2003 3:40:46 am

Yes definitly works

look that this beautiful error message..

SOAP fault: Server Error - Can't read from Client. HOST: 192.168.0.1 PORT: 8080

THX again

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

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 30 2025 21:37:52
Script start
Timing: Jan 30 2025 21:37:52
Module start 'layout'
Timing: Jan 30 2025 21:37:52
Module start 'content'
Timing: Jan 30 2025 21:37:52
Module end 'content'
Timing: Jan 30 2025 21:37:52
Script end

Main resources:

Total runtime0.0578 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.2656151.2266
Module start 'layout' 0.00510.0048 739.4922220.7188
Module start 'content' 0.00990.0462 960.21091,005.8359
Module end 'content' 0.05600.0017 1,966.046937.9922
Script end 0.0578  2,004.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00294.9556140.0002
Check MTime0.00132.1657140.0001
Mysql Total
Database connection0.00060.953210.0006
Mysqli_queries0.00284.786530.0009
Looping result0.00000.029310.0000
Template Total0.00122.110.0012
Template load0.00101.692810.0010
Template processing0.00030.435810.0003
Override
Cache load0.00071.219110.0007
General
dbfile0.00091.586980.0001
String conversion0.00000.012040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0003 secs