Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
moved wsdl caching settings to application.ini
  • Loading branch information
Michael committed Sep 20, 2011
1 parent 71ff900 commit d4fb1e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
7 changes: 4 additions & 3 deletions application/configs/application.ini
Expand Up @@ -6,7 +6,7 @@ resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
; --------------------------
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

phpSettings.soap.wsdl_cache_enabled = 1
includePaths.library = APPLICATION_PATH "/../library"
includePaths.resource = APPLICATION_PATH "/../library/Bisna/Application/Resource"

Expand Down Expand Up @@ -119,8 +119,9 @@ resources.router.routes.artists.defaults.module = site
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

phpSettings.soap.wsdl_cache_enabled = 0

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
phpSettings.display_errors = 1
phpSettings.soap.wsdl_cache_enabled = 0
13 changes: 4 additions & 9 deletions public/ws/soap.php
Expand Up @@ -15,10 +15,7 @@

include "Zend/Loader/Autoloader.php";
$l = Zend_Loader_Autoloader::getInstance();
$l->registerNamespace('Boilerplate_');
$l->registerNamespace('Elastica_');
$l->registerNamespace('App_');
include "App/Webservice/Calls.php"; //?
include "App/Webservice/Calls.php";

// Create application, bootstrap, and run
$application = new Zend_Application(
Expand All @@ -28,21 +25,19 @@

$application->bootstrap();

ini_set("soap.wsdl_cache_enabled", 0);//for development

if (isset($_GET['WSDL'])) {
$autodiscover = new \Boilerplate\Webservice\Soap\AutoDiscover();
$autodiscover->setUri('http://localhost:8080/ws/soap.php');
$autodiscover->setUri('http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/ws/soap.php');
$autodiscover->setClass("\\App\\Webservice\\Calls");
$autodiscover->handle();
} elseif (isset($_GET['INTERNALWSDL'])) {
$autodiscover = new Zend_Soap_AutoDiscover();
$autodiscover->setClass('\\App\\Webservice\\Calls');
$autodiscover->setUri('http://localhost:8080/ws/soap.php');
$autodiscover->setUri('http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/ws/soap.php');
$autodiscover->handle();
} else {
$options = array('soap_version' => SOAP_1_2);
$server = new \Boilerplate\Webservice\Soap\Server('http://localhost/ws/soap.php?INTERNALWSDL=1', $options);
$server = new \Boilerplate\Webservice\Soap\Server('http://'.$_SERVER['SERVER_NAME'].'/ws/soap.php?INTERNALWSDL=1', $options);
$server->setObject(new \App\Webservice\Calls());
$server->handle();
}

0 comments on commit d4fb1e1

Please sign in to comment.