Forums / Setup & design / Double Newbie Struggles with Soap ... Seeks Clarity.

Double Newbie Struggles with Soap ... Seeks Clarity.

Author Message

Tom Walker

Saturday 08 January 2005 4:20:28 pm

I am working on a application that will require extensive external access to data collected in an eZ publish site. Soap appears to be the most logical long term solution. Since I am new to both soap and eZ Publish I'm experiencing some confusion. I have successfully completed the tutorial "Building an eZ publish site." In the process I became thoroughly impressed with eZ publish and proved that I'm not a complete idiot. When it came time to "prove in" the viability of soap, however, I failed to create a successful connection with the server.

I was successful at working through the tutorial "Consuming web services with eZ SOAP Client." I was able to get the little php file I wrote to spit back some interesting weather information about airports. So I think I have a tentative grasp on the client side of the equation. However when I point the client toward my own server, or rather try to point the client toward what I think is my server I'm getting the error "Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 157 bytes) in /srv/www/htdocs/ezpublish3/lib/ezxml/classes/ezxml.php on line 433". I believe that is where my problem lies, I don't really know how to tell the client to find the server.

Here is some more information about my situation that I hope will help in helping me. I have noticed the difference in the soap server for version 3.5. I have been careful to work through the tutorial entitled "Hello World example ( eZ publish 3.5 + )" because I have installed eZ Publish 3.5. Everything seems to have gone right except that I'm confused by the instructions:

<b>All we need to do is to give the request name, helloWorld, and the target namespace, http://ez.no/sdk/soap/examples. This object is then sent to the server via the client.</b>

I guess I don't know what "target namespace" means in this instance and I can't figure it out from the examples. I'll list below the files that I've created in hopes that someone will see what I've done wrong. I've changed my server's name in the exhibits to my.server.com, but just to be clear I'm using a real server name that works. Also I am not using a virtual server. Thanks in advance for any help I can get.

Tom Walker

Here is my Override file from settings/override/soap.ini.append.php
------------
#?ini charset="iso-8859-1"?
# eZ publish configuration file.
#
# NOTE: It is not recommended to edit this files directly, instead
# a file in override should be created for setting the
# values that is required for your site. Either create
# a file called settings/override/soap.ini.append or
# settings/override/soap.ini.append.php for more security
# in non-virtualhost modes (the .php file may already be present
# and can be used for this purpose).

[GeneralSettings]
EnableSOAP=true
Logging=disabled # not supported yet.

[ExtensionSettings]
# Extensions for SOAP functions.
# SOAP functions must be registered under soap/initialize.php
SOAPExtentensions[]=dataBridge
-----------------

Here is the extension/dataBridge/soap/initialize.php file:
--------------------
<?php
/*
Soap Functions File
This file is used to register functions for this eZpublish server.
*/

/*
Function Registration
*/

$server->registerFunction("helloWorld");

/*
Function Call Code
*/

function helloWorld()
{
return "Hello World!";
}

?>
---------------------------

Here is the listing for the client setup file which resides in the root folder for eZ Publish. I am accessing it with the browser location http://my.server.com/soaptest2.php.
---------------------------
<?php
// Switch off notices
error_reporting(E_ALL ^ E_NOTICE);

// Set the include path for eZ publish
ini_set('include_path','/srv/www/htdocs/ezpublish3/');

// Require the necessary libraries
require_once('lib/ezsoap/classes/ezsoapclient.php');
require_once('lib/ezsoap/classes/ezsoaprequest.php');

// Create the SOAP client
$client=new eZSOAPClient("my.server.com","/dataBridge");

// Create a SOAP request
$request=new eZSOAPRequest("helloWorld","dataBridge");

// Send the request to get back a response object
$response = $client->send($request);

if( $response->isFault() ) {
trigger_error($response->faultString());
return false;
} else {
echo ( '<pre>' );
print_r( $response->value() );
echo ( '</pre>' );
}
?>
-------------------------

eZ debug

Timing: Jan 18 2025 21:02:30
Script start
Timing: Jan 18 2025 21:02:30
Module start 'content'
Timing: Jan 18 2025 21:02:31
Module end 'content'
Timing: Jan 18 2025 21:02:31
Script end

Main resources:

Total runtime0.8952 sec
Peak memory usage4,096.0000 KB
Database Queries183

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 587.8594180.8125
Module start 'content' 0.00730.7653 768.6719443.4688
Module end 'content' 0.77270.1224 1,212.1406333.7813
Script end 0.8951  1,545.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4545210.0002
Check MTime0.00160.1749210.0001
Mysql Total
Database connection0.00070.072610.0007
Mysqli_queries0.822791.90001830.0045
Looping result0.00180.19651810.0000
Template Total0.865296.720.4326
Template load0.00200.225120.0010
Template processing0.863296.428420.4316
Template load and register function0.00020.025110.0002
states
state_id_array0.00110.123010.0011
state_identifier_array0.00060.070720.0003
Override
Cache load0.00180.2012750.0000
Sytem overhead
Fetch class attribute can translate value0.00160.178520.0008
Fetch class attribute name0.00070.082810.0007
XML
Image XML parsing0.00050.053820.0002
class_abstraction
Instantiating content class attribute0.00000.000510.0000
General
dbfile0.00460.5117210.0002
String conversion0.00000.001030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
15content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs