ID:               41665
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tracyli119 at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Apache2 related
 Operating System: Debian 2.6.21.3  + php_soap
 PHP Version:      5.2.3
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




Previous Comments:
------------------------------------------------------------------------

[2007-06-12 09:30:49] tracyli119 at gmail dot com

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 this bug report at http://bugs.php.net/?id=41665&edit=1

Reply via email to