From: tracyli119 at gmail dot com
Operating system: Debian 2.6.21.3 + php_soap
PHP version: 5.2.3
PHP Bug Type: Apache2 related
Bug description: ini_set("soap.wsdl_cache_enabled", "0"); not work under the
debian+ apache2.2
Description:
------------
Title: ini_set("soap.wsdl_cache_enabled", "0"); not work under the debian
Phenomenons:
server1.php
<?php
$quotes = array (
"ibm" => 98.42
);
function getQuote($symbol) {
global $quotes;
//return $quotes[$symbol];
return "kill soap";
};
ini_set("soap.wsdl_cache_enabled", "0");
$server = new SoapServer("http://192.168.0.110/model/stockquote.wsdl");
$server -> addFunction ("getQuote");
$server -> handle();
?>
client1.php
<?php
/*
* Created on 2007-6-11
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
$client = new SoapClient("http://192.168.0.110/model/stockquote.wsdl",
array (
"trace" => 1,
"exceptions" => 0));
try {
$value = $client -> getQuote("ibm");
echo "value=" . $value."\n";
var_dump ( $client -> __getFunctions() );
if (is_soap_fault($value)) {
trigger_error("SOAP Fault: (faultcode: {$result->faultcode},
faultstring: {$result->faultstring})", E_USER_ERROR);
}
print "<pre>\n";
echo "RequestHeaders:\n".htmlspecialchars( $client ->
__getLastRequestHeaders()) . "\n";
echo "Request:\n". htmlspecialchars ( $client ->
__getLastRequest() ) . "\n";
echo "ResponseHeaders:\n". htmlspecialchars ( $client ->
__getLastResponseHeaders()) . "\n";
echo "Response:\n" . htmlspecialchars ( $client ->
__getLastResponse()) . "\n";
print "</pre>";
} catch ( SoapFault $exception) {
echo 'Exception=' . $exception . "\n<br/>";
}
?>
stockquote.wsdl
<?xml version ='1.0' encoding ='UTF-8' ?>
<definitions name='StockQuote'
targetNamespace='http://example.org/StockQuote'
xmlns:tns=' http://localhost/voddler/ '
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<message name='getQuoteRequest'>
<part name='symbol' type='xsd:string'/>
</message>
<message name='getQuoteResponse'>
<part name='Result' type='xsd:float'/>
</message>
<portType name='StockQuotePortType'>
<operation name='getQuote'>
<input message='tns:getQuoteRequest'/>
<output message='tns:getQuoteResponse'/>
</operation>
</portType>
<binding name='StockQuoteBinding' type='tns:StockQuotePortType'>
<soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='getQuote'>
<soap:operation soapAction='urn:xmethods-delayed-quotes#getQuote'/>
<input>
<soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</input>
<output>
<soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</output>
</operation>
</binding>
<service name='StockQuoteService'>
<port name='StockQuotePort' binding='tns:StockQuoteBinding'>
<soap:address location='http://192.168.0.110/server1.php'/>
</port>
</service>
</definitions>
In browser prompt: not found.
In the apache "error.log" prompt "/var/www/voddler/server1.php not found
or unable to stat".( We have define <soap:address
location='http://192.168.0.110/voddler/server1.php'/> in the
stockquote.wsdl.
After clear the "wsdl_cache_dir" contents. It works.
--
Edit bug report at http://bugs.php.net/?id=41665&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=41665&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=41665&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=41665&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41665&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=41665&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41665&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41665&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41665&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41665&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41665&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=41665&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=41665&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41665&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41665&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41665&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41665&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41665&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41665&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41665&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41665&r=mysqlcfg