Ask a Question related to PHP Bugs, Design and Development.
-
jdespatis at yahoo dot fr #1
#40649 [NEW]: Void Soap function can't return SegFault
From: jdespatis at yahoo dot fr
Operating system: Linux 2.6.18 Debian
PHP version: 5.2.1
PHP Bug Type: SOAP related
Bug description: Void Soap function can't return SegFault
Description:
------------
I have a client and server soap which worked with php 5.1.2, but whenever
i upgrade to php > 5.1.2, this code doesn't work anymore.
It's a simple client and server soap.
After debugging, the problem comes from the fact that if no <message
name="funcResponse"> is provided to a function to explain the output, then
this function always sends null
Even if the function throws an exception
It seems that php <= 5.1.2 was adding a default output function so that
exceptions could be throwed
Reproduce code:
---------------
When using the simple client :
[url]http://www.despatis.com/client.phps[/url]
with the simple soap server:
[url]http://www.despatis.com/soap_server.phps[/url]
and with the wsdl:
[url]http://www.despatis.com/Webservices.wsdl[/url]
(to make the code work, the good wsdl to use
is:[url]http://www.despatis.com/Webservices2.wsdl[/url], however this code should
work with a minimal Webservices.wsdl, that doesn't provide information on
output function as the function is a void function !)
Expected result:
----------------
client.php should print:
Request :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:xmethods" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:setSerial><serial
xsi:type="xsd:string">pif</serial><version
xsi:type="xsd:string">puf</version></ns1:setSerial></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Exception
throwed</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Actual result:
--------------
Actual result is:
Request :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:xmethods" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:setSerial><serial
xsi:type="xsd:string">pif</serial><version
xsi:type="xsd:string">puf</version></ns1:setSerial></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response:
--
Edit bug report at [url]http://bugs.php.net/?id=40649&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40649&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40649&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40649&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40649&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40649&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40649&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40649&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40649&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40649&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40649&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40649&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40649&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40649&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40649&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40649&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40649&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40649&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40649&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40649&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40649&r=mysqlcfg[/url]
jdespatis at yahoo dot fr Guest
-
#38665 [Bgs]: SOAP calls constructor twice when returning "void"
ID: 38665 User updated by: jsgoupil@php.net Reported By: jsgoupil@php.net Status: Bogus Bug Type: SOAP... -
#38665 [Asn->Bgs]: SOAP calls constructor twice when returning "void"
ID: 38665 Updated by: dmitry@php.net Reported By: jsgoupil@php.net -Status: Assigned +Status: Bogus... -
#38665 [Bgs->Opn]: SOAP calls constructor twice when returning "void"
ID: 38665 Updated by: jsgoupil@php.net Reported By: jsgoupil@php.net -Status: Bogus +Status: Open... -
Running a void function in psql
I run 'psql -f mycreatedb.sql' to setup things for my program. It has to run a few stored procedures after they're created. However, I do this by... -
Running functions that return void in psql
I've got quite a few plpgsql functions that insert, update or delete. They're all declared to return void. All other functions, I can just run... -
tony2001@php.net #2
#40649 [Opn->Fbk]: Void Soap function can't return SegFault
ID: 40649
Updated by: [email]tony2001@php.net[/email]
Reported By: jdespatis at yahoo dot fr
-Status: Open
+Status: Feedback
Bug Type: SOAP related
Operating System: Linux 2.6.18 Debian
PHP Version: 5.2.1
New Comment:
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
Previous Comments:
------------------------------------------------------------------------
[2007-02-26 19:19:25] jdespatis at yahoo dot fr
Description:
------------
I have a client and server soap which worked with php 5.1.2, but
whenever i upgrade to php > 5.1.2, this code doesn't work anymore.
It's a simple client and server soap.
After debugging, the problem comes from the fact that if no <message
name="funcResponse"> is provided to a function to explain the output,
then this function always sends null
Even if the function throws an exception
It seems that php <= 5.1.2 was adding a default output function so that
exceptions could be throwed
Reproduce code:
---------------
When using the simple client :
[url]http://www.despatis.com/client.phps[/url]
with the simple soap server:
[url]http://www.despatis.com/soap_server.phps[/url]
and with the wsdl:
[url]http://www.despatis.com/Webservices.wsdl[/url]
(to make the code work, the good wsdl to use
is:[url]http://www.despatis.com/Webservices2.wsdl[/url], however this code should
work with a minimal Webservices.wsdl, that doesn't provide information
on output function as the function is a void function !)
Expected result:
----------------
client.php should print:
Request :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:xmethods" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:setSerial><serial
xsi:type="xsd:string">pif</serial><version
xsi:type="xsd:string">puf</version></ns1:setSerial></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Exception
throwed</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Actual result:
--------------
Actual result is:
Request :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:xmethods" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:setSerial><serial
xsi:type="xsd:string">pif</serial><version
xsi:type="xsd:string">puf</version></ns1:setSerial></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response:
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40649&edit=1[/url]
tony2001@php.net Guest
-
jdespatis at yahoo dot fr #3
#40649 [Fbk->Opn]: Void Soap function can't return SegFault
ID: 40649
User updated by: jdespatis at yahoo dot fr
Reported By: jdespatis at yahoo dot fr
-Status: Feedback
+Status: Open
Bug Type: SOAP related
Operating System: Linux 2.6.18 Debian
PHP Version: 5.2.1
New Comment:
Exactly the same problem with the last last php snapshot you provide.
But this bug is quite old, i've detected in php 5.1.3 and upper
(i sticked to php5.1.2 to avoid this bug, but now i need to use php5.2)
Previous Comments:
------------------------------------------------------------------------
[2007-02-26 19:24:39] [email]tony2001@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
------------------------------------------------------------------------
[2007-02-26 19:19:25] jdespatis at yahoo dot fr
Description:
------------
I have a client and server soap which worked with php 5.1.2, but
whenever i upgrade to php > 5.1.2, this code doesn't work anymore.
It's a simple client and server soap.
After debugging, the problem comes from the fact that if no <message
name="funcResponse"> is provided to a function to explain the output,
then this function always sends null
Even if the function throws an exception
It seems that php <= 5.1.2 was adding a default output function so that
exceptions could be throwed
Reproduce code:
---------------
When using the simple client :
[url]http://www.despatis.com/client.phps[/url]
with the simple soap server:
[url]http://www.despatis.com/soap_server.phps[/url]
and with the wsdl:
[url]http://www.despatis.com/Webservices.wsdl[/url]
(to make the code work, the good wsdl to use
is:[url]http://www.despatis.com/Webservices2.wsdl[/url], however this code should
work with a minimal Webservices.wsdl, that doesn't provide information
on output function as the function is a void function !)
Expected result:
----------------
client.php should print:
Request :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:xmethods" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:setSerial><serial
xsi:type="xsd:string">pif</serial><version
xsi:type="xsd:string">puf</version></ns1:setSerial></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Exception
throwed</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Actual result:
--------------
Actual result is:
Request :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:xmethods" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:setSerial><serial
xsi:type="xsd:string">pif</serial><version
xsi:type="xsd:string">puf</version></ns1:setSerial></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response:
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40649&edit=1[/url]
jdespatis at yahoo dot fr Guest
-
tony2001@php.net #4
#40649 [Opn->Asn]: Void Soap function can't return SegFault
ID: 40649
Updated by: [email]tony2001@php.net[/email]
Reported By: jdespatis at yahoo dot fr
-Status: Open
+Status: Assigned
Bug Type: SOAP related
Operating System: Linux 2.6.18 Debian
PHP Version: 5.2.1
-Assigned To:
+Assigned To: dmitry
Previous Comments:
------------------------------------------------------------------------
[2007-02-26 19:49:26] jdespatis at yahoo dot fr
Exactly the same problem with the last last php snapshot you provide.
But this bug is quite old, i've detected in php 5.1.3 and upper
(i sticked to php5.1.2 to avoid this bug, but now i need to use php5.2)
------------------------------------------------------------------------
[2007-02-26 19:24:39] [email]tony2001@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
------------------------------------------------------------------------
[2007-02-26 19:19:25] jdespatis at yahoo dot fr
Description:
------------
I have a client and server soap which worked with php 5.1.2, but
whenever i upgrade to php > 5.1.2, this code doesn't work anymore.
It's a simple client and server soap.
After debugging, the problem comes from the fact that if no <message
name="funcResponse"> is provided to a function to explain the output,
then this function always sends null
Even if the function throws an exception
It seems that php <= 5.1.2 was adding a default output function so that
exceptions could be throwed
Reproduce code:
---------------
When using the simple client :
[url]http://www.despatis.com/client.phps[/url]
with the simple soap server:
[url]http://www.despatis.com/soap_server.phps[/url]
and with the wsdl:
[url]http://www.despatis.com/Webservices.wsdl[/url]
(to make the code work, the good wsdl to use
is:[url]http://www.despatis.com/Webservices2.wsdl[/url], however this code should
work with a minimal Webservices.wsdl, that doesn't provide information
on output function as the function is a void function !)
Expected result:
----------------
client.php should print:
Request :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:xmethods" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:setSerial><serial
xsi:type="xsd:string">pif</serial><version
xsi:type="xsd:string">puf</version></ns1:setSerial></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Exception
throwed</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Actual result:
--------------
Actual result is:
Request :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:xmethods" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:setSerial><serial
xsi:type="xsd:string">pif</serial><version
xsi:type="xsd:string">puf</version></ns1:setSerial></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response:
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40649&edit=1[/url]
tony2001@php.net Guest
-
dmitry@php.net #5
#40649 [Asn->Bgs]: Void Soap function can't return SegFault
ID: 40649
Updated by: [email]dmitry@php.net[/email]
Reported By: jdespatis at yahoo dot fr
-Status: Assigned
+Status: Bogus
Bug Type: SOAP related
Operating System: Linux 2.6.18 Debian
PHP Version: 5.2.1
Assigned To: dmitry
New Comment:
This is not a bug. SOAP client must not wait for response from one-way
operation. BTW ext/soap has an option to change this behavior.
The following code works as you expected.
<?php
ini_set('soap.wsdl_cache_enabled', false);
$client = new SoapClient(dirname(__FILE__).'/bug40649.wsdl',array(
"trace" => 1,
"exceptions" => 0,
"features" => SOAP_WAIT_ONE_WAY_CALLS
));
$ret = $client->setSerial("pif", "puf");
print "<pre>\n";
print "Request :\n".$client->__getLastRequest() ."\n";
print "Response:\n".$client->__getLastResponse()."\n";
print "</pre>";
?>
Previous Comments:
------------------------------------------------------------------------
[2007-02-26 19:49:26] jdespatis at yahoo dot fr
Exactly the same problem with the last last php snapshot you provide.
But this bug is quite old, i've detected in php 5.1.3 and upper
(i sticked to php5.1.2 to avoid this bug, but now i need to use php5.2)
------------------------------------------------------------------------
[2007-02-26 19:24:39] [email]tony2001@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
------------------------------------------------------------------------
[2007-02-26 19:19:25] jdespatis at yahoo dot fr
Description:
------------
I have a client and server soap which worked with php 5.1.2, but
whenever i upgrade to php > 5.1.2, this code doesn't work anymore.
It's a simple client and server soap.
After debugging, the problem comes from the fact that if no <message
name="funcResponse"> is provided to a function to explain the output,
then this function always sends null
Even if the function throws an exception
It seems that php <= 5.1.2 was adding a default output function so that
exceptions could be throwed
Reproduce code:
---------------
When using the simple client :
[url]http://www.despatis.com/client.phps[/url]
with the simple soap server:
[url]http://www.despatis.com/soap_server.phps[/url]
and with the wsdl:
[url]http://www.despatis.com/Webservices.wsdl[/url]
(to make the code work, the good wsdl to use
is:[url]http://www.despatis.com/Webservices2.wsdl[/url], however this code should
work with a minimal Webservices.wsdl, that doesn't provide information
on output function as the function is a void function !)
Expected result:
----------------
client.php should print:
Request :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:xmethods" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:setSerial><serial
xsi:type="xsd:string">pif</serial><version
xsi:type="xsd:string">puf</version></ns1:setSerial></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Exception
throwed</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Actual result:
--------------
Actual result is:
Request :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:xmethods" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:setSerial><serial
xsi:type="xsd:string">pif</serial><version
xsi:type="xsd:string">puf</version></ns1:setSerial></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response:
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40649&edit=1[/url]
dmitry@php.net Guest



Reply With Quote

