Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #31993 : SoapServer::handle() stops the script
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 11th March 10:47
php-bugs
External User
 
Posts: 1
Default #31993 : SoapServer::handle() stops the script



From: cfendt at silicom dot fr
Operating system: WinXp, Mac OS X
PHP version: 5.0.3
PHP Bug Type: SOAP related
Bug description: SoapServer::handle() stops the script

Description:
------------
Hello,

I try to make some DB work after a SoapServer::handle()... but the script
ends!

on the output, we can see the soapFault dump, but no "<!-- Alive!!!!
-->"...

I try it on Win 5.0.1, Win 5.0.3, Win 5.0-CVS (15/2/2005), Win 5.1-CVS
(15/2/2005), OS X 5.0.1 (build from source), OS X 5.0.3 (build from
source)

Reproduce code:
---------------
<?php
$server = new SoapServer(null,
array('uri' => "http://test-uri/"));
$server->handle("");
echo "\r\n<!-- Alive!!!! -->\r\n";
?>

Expected result:
----------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<!-- Alive!!!! -->

Actual result:
--------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--
Edit bug report at http://bugs.php.net/?id=31993&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31993&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31993&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31993&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31993&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31993&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31993&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31993&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31993&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31993&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31993&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31993&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31993&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31993&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31993&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31993&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31993&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31993&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31993&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31993&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31993&r=mysqlcfg
  Reply With Quote


  sponsored links


2 11th March 10:47
External User
 
Posts: 1
Default #31993 : SoapServer::handle() stops the script



ID: 31993
Updated by: derick@php.net
Reported By: cfendt at silicom dot fr
-Status: Open
+Status: Assigned
Bug Type: SOAP related
Operating System: WinXp, Mac OS X
PHP Version: 5.0.3
-Assigned To:
+Assigned To: dmitry


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

[2005-02-16 09:39:31] cfendt at silicom dot fr

Description:
------------
Hello,

I try to make some DB work after a SoapServer::handle()... but the
script ends!

on the output, we can see the soapFault dump, but no "<!-- Alive!!!!
-->"...

I try it on Win 5.0.1, Win 5.0.3, Win 5.0-CVS (15/2/2005), Win 5.1-CVS
(15/2/2005), OS X 5.0.1 (build from source), OS X 5.0.3 (build from
source)

Reproduce code:
---------------
<?php
$server = new SoapServer(null,
array('uri' => "http://test-uri/"));
$server->handle("");
echo "\r\n<!-- Alive!!!! -->\r\n";
?>

Expected result:
----------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<!-- Alive!!!! -->

Actual result:
--------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=31993&edit=1
  Reply With Quote
3 11th March 14:22
php-bugs
External User
 
Posts: 1
Default #31993 : SoapServer::handle() stops the script


ID: 31993
User updated by: cfendt at silicom dot fr
Reported By: cfendt at silicom dot fr
Status: Assigned
Bug Type: SOAP related
Operating System: WinXp, Mac OS X
PHP Version: 5.0.3
Assigned To: dmitry
New Comment:

In fact, I use a WSDL file...

CODE :

<?php
class web_service {
function sayHello($input) {
return "Hello, ".$input."...";
}
}

$soap_query =
"<soapenv:Envelope
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>"
. " <soapenv:Body>"
. " <m:sayHello xmlns:m='http://localhost/test.php'>"
. " <m:login>toto</m:login>"
. " </m:sayHello>"
. " </soapenv:Body>"
. "</soapenv:Envelope>";

$server = new SoapServer("./test.wsdl");
$server->setclass("web_service");
$server->handle($soap_query);
echo "\r\nAlive!!!!\r\n";
$server->handle("");
echo "\r\nAlive!!!!\r\n";
?>

WSDL :

<?xml version="1.0"?>
<wsdl:definitions
xmlns:tns="urn:TEST"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:typens="urn:TEST"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:TEST"
name="TEST">
<message name="sayHelloInputMessage">
<part name="login" type="xsd:string"/>
</message>
<message name="sayHelloOutputMessage">
<part name="hello" type="xsd:string"/>
</message>
<portType name="TESTPorts">
<operation name="sayHello">
<input message="typens:sayHelloInputMessage"/>
<output message="typens:sayHelloOutputMessage"/>
</operation>
</portType>
<binding name="TESTBinding" type="typens:TESTPorts">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sayHello">
<soapperation soapAction="http://localhost/test.php"/>
<input ><soap:body use="literal"/></input >
<output><soap:body use="literal"/></output>
</operation>
</binding>
<service name="TESTWebService">
<do***entation>TEST WebService</do***entation>
<port name="TESTPorts" binding="typens:TESTBinding">
<soap:address location="http://localhost/test.php"/>
</port>
</service>
</wsdl:definitions>

RESULT :

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:sayHelloResponse>
<hello>Hello, toto...</hello>
</SOAP-ENV:sayHelloResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Alive!!!!
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

When the query is good => no problem
The probleme is due to the SoapFault...
I tried to catch SoapFault... but without result...
try {
$server->handle("");
} catch (SoapFault $fault) {
echo "SoapFault";
}

I don't know what is the more switable: never stop the process, or
throw Exception...

Regards,

FENDT Charles


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

[2005-02-16 09:39:31] cfendt at silicom dot fr

Description:
------------
Hello,

I try to make some DB work after a SoapServer::handle()... but the
script ends!

on the output, we can see the soapFault dump, but no "<!-- Alive!!!!
-->"...

I try it on Win 5.0.1, Win 5.0.3, Win 5.0-CVS (15/2/2005), Win 5.1-CVS
(15/2/2005), OS X 5.0.1 (build from source), OS X 5.0.3 (build from
source)

Reproduce code:
---------------
<?php
$server = new SoapServer(null,
array('uri' => "http://test-uri/"));
$server->handle("");
echo "\r\n<!-- Alive!!!! -->\r\n";
?>

Expected result:
----------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<!-- Alive!!!! -->

Actual result:
--------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=31993&edit=1
  Reply With Quote
4 17th March 14:14
External User
 
Posts: 1
Default #31993 : SoapServer::handle() stops the script


ID: 31993
Updated by: sniper@php.net
Reported By: cfendt at silicom dot fr
-Status: Assigned
+Status: Feedback
Bug Type: SOAP related
Operating System: WinXp, Mac OS X
PHP Version: 5.0.3
Assigned To: dmitry
New Comment:

Please try using this CVS snapshot:

http://snaps.php.net/php5-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5-win32-latest.zip


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

[2005-02-17 09:53:21] cfendt at silicom dot fr

In fact, I use a WSDL file...

CODE :

<?php
class web_service {
function sayHello($input) {
return "Hello, ".$input."...";
}
}

$soap_query =
"<soapenv:Envelope
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>"
. " <soapenv:Body>"
. " <m:sayHello xmlns:m='http://localhost/test.php'>"
. " <m:login>toto</m:login>"
. " </m:sayHello>"
. " </soapenv:Body>"
. "</soapenv:Envelope>";

$server = new SoapServer("./test.wsdl");
$server->setclass("web_service");
$server->handle($soap_query);
echo "\r\nAlive!!!!\r\n";
$server->handle("");
echo "\r\nAlive!!!!\r\n";
?>

WSDL :

<?xml version="1.0"?>
<wsdl:definitions
xmlns:tns="urn:TEST"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:typens="urn:TEST"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:TEST"
name="TEST">
<message name="sayHelloInputMessage">
<part name="login" type="xsd:string"/>
</message>
<message name="sayHelloOutputMessage">
<part name="hello" type="xsd:string"/>
</message>
<portType name="TESTPorts">
<operation name="sayHello">
<input message="typens:sayHelloInputMessage"/>
<output message="typens:sayHelloOutputMessage"/>
</operation>
</portType>
<binding name="TESTBinding" type="typens:TESTPorts">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sayHello">
<soapperation soapAction="http://localhost/test.php"/>
<input ><soap:body use="literal"/></input >
<output><soap:body use="literal"/></output>
</operation>
</binding>
<service name="TESTWebService">
<do***entation>TEST WebService</do***entation>
<port name="TESTPorts" binding="typens:TESTBinding">
<soap:address location="http://localhost/test.php"/>
</port>
</service>
</wsdl:definitions>

RESULT :

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:sayHelloResponse>
<hello>Hello, toto...</hello>
</SOAP-ENV:sayHelloResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Alive!!!!
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

When the query is good => no problem
The probleme is due to the SoapFault...
I tried to catch SoapFault... but without result...
try {
$server->handle("");
} catch (SoapFault $fault) {
echo "SoapFault";
}

I don't know what is the more switable: never stop the process, or
throw Exception...

Regards,

FENDT Charles

------------------------------------------------------------------------

[2005-02-16 09:39:31] cfendt at silicom dot fr

Description:
------------
Hello,

I try to make some DB work after a SoapServer::handle()... but the
script ends!

on the output, we can see the soapFault dump, but no "<!-- Alive!!!!
-->"...

I try it on Win 5.0.1, Win 5.0.3, Win 5.0-CVS (15/2/2005), Win 5.1-CVS
(15/2/2005), OS X 5.0.1 (build from source), OS X 5.0.3 (build from
source)

Reproduce code:
---------------
<?php
$server = new SoapServer(null,
array('uri' => "http://test-uri/"));
$server->handle("");
echo "\r\n<!-- Alive!!!! -->\r\n";
?>

Expected result:
----------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<!-- Alive!!!! -->

Actual result:
--------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=31993&edit=1
  Reply With Quote
5 18th March 03:46
External User
 
Posts: 1
Default #31993 : SoapServer::handle() stops the script


ID: 31993
Updated by: sniper@php.net
Reported By: cfendt at silicom dot fr
-Status: Open
+Status: Assigned
Bug Type: SOAP related
Operating System: WinXp, Mac OS X
-PHP Version: 5.0.3
+PHP Version: 5CVS-2005-03-29
Assigned To: dmitry
New Comment:

Assigning back to Dmitry.

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

[2005-03-29 13:47:23] cfendt at silicom dot fr

The script always stops when a soapfault is raised...
No catch possible...

------------------------------------------------------------------------

[2005-03-25 01:22:25] sniper@php.net

Please try using this CVS snapshot:

http://snaps.php.net/php5-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5-win32-latest.zip

------------------------------------------------------------------------

[2005-02-17 09:53:21] cfendt at silicom dot fr

In fact, I use a WSDL file...

CODE :

<?php
class web_service {
function sayHello($input) {
return "Hello, ".$input."...";
}
}

$soap_query =
"<soapenv:Envelope
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>"
. " <soapenv:Body>"
. " <m:sayHello xmlns:m='http://localhost/test.php'>"
. " <m:login>toto</m:login>"
. " </m:sayHello>"
. " </soapenv:Body>"
. "</soapenv:Envelope>";

$server = new SoapServer("./test.wsdl");
$server->setclass("web_service");
$server->handle($soap_query);
echo "\r\nAlive!!!!\r\n";
$server->handle("");
echo "\r\nAlive!!!!\r\n";
?>

WSDL :

<?xml version="1.0"?>
<wsdl:definitions
xmlns:tns="urn:TEST"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:typens="urn:TEST"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:TEST"
name="TEST">
<message name="sayHelloInputMessage">
<part name="login" type="xsd:string"/>
</message>
<message name="sayHelloOutputMessage">
<part name="hello" type="xsd:string"/>
</message>
<portType name="TESTPorts">
<operation name="sayHello">
<input message="typens:sayHelloInputMessage"/>
<output message="typens:sayHelloOutputMessage"/>
</operation>
</portType>
<binding name="TESTBinding" type="typens:TESTPorts">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sayHello">
<soapperation soapAction="http://localhost/test.php"/>
<input ><soap:body use="literal"/></input >
<output><soap:body use="literal"/></output>
</operation>
</binding>
<service name="TESTWebService">
<do***entation>TEST WebService</do***entation>
<port name="TESTPorts" binding="typens:TESTBinding">
<soap:address location="http://localhost/test.php"/>
</port>
</service>
</wsdl:definitions>

RESULT :

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:sayHelloResponse>
<hello>Hello, toto...</hello>
</SOAP-ENV:sayHelloResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Alive!!!!
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

When the query is good => no problem
The probleme is due to the SoapFault...
I tried to catch SoapFault... but without result...
try {
$server->handle("");
} catch (SoapFault $fault) {
echo "SoapFault";
}

I don't know what is the more switable: never stop the process, or
throw Exception...

Regards,

FENDT Charles

------------------------------------------------------------------------

[2005-02-16 09:39:31] cfendt at silicom dot fr

Description:
------------
Hello,

I try to make some DB work after a SoapServer::handle()... but the
script ends!

on the output, we can see the soapFault dump, but no "<!-- Alive!!!!
-->"...

I try it on Win 5.0.1, Win 5.0.3, Win 5.0-CVS (15/2/2005), Win 5.1-CVS
(15/2/2005), OS X 5.0.1 (build from source), OS X 5.0.3 (build from
source)

Reproduce code:
---------------
<?php
$server = new SoapServer(null,
array('uri' => "http://test-uri/"));
$server->handle("");
echo "\r\n<!-- Alive!!!! -->\r\n";
?>

Expected result:
----------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<!-- Alive!!!! -->

Actual result:
--------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=31993&edit=1
  Reply With Quote
6 22nd March 08:42
php-bugs
External User
 
Posts: 1
Default #31993 : SoapServer::handle() stops the script


ID: 31993
User updated by: cfendt at silicom dot fr
Reported By: cfendt at silicom dot fr
-Status: Feedback
+Status: Open
Bug Type: SOAP related
Operating System: WinXp, Mac OS X
PHP Version: 5.0.3
Assigned To: dmitry
New Comment:

The script always stops when a soapfault is raised...
No catch possible...


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

[2005-03-25 01:22:25] sniper@php.net

Please try using this CVS snapshot:

http://snaps.php.net/php5-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5-win32-latest.zip

------------------------------------------------------------------------

[2005-02-17 09:53:21] cfendt at silicom dot fr

In fact, I use a WSDL file...

CODE :

<?php
class web_service {
function sayHello($input) {
return "Hello, ".$input."...";
}
}

$soap_query =
"<soapenv:Envelope
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>"
. " <soapenv:Body>"
. " <m:sayHello xmlns:m='http://localhost/test.php'>"
. " <m:login>toto</m:login>"
. " </m:sayHello>"
. " </soapenv:Body>"
. "</soapenv:Envelope>";

$server = new SoapServer("./test.wsdl");
$server->setclass("web_service");
$server->handle($soap_query);
echo "\r\nAlive!!!!\r\n";
$server->handle("");
echo "\r\nAlive!!!!\r\n";
?>

WSDL :

<?xml version="1.0"?>
<wsdl:definitions
xmlns:tns="urn:TEST"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:typens="urn:TEST"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:TEST"
name="TEST">
<message name="sayHelloInputMessage">
<part name="login" type="xsd:string"/>
</message>
<message name="sayHelloOutputMessage">
<part name="hello" type="xsd:string"/>
</message>
<portType name="TESTPorts">
<operation name="sayHello">
<input message="typens:sayHelloInputMessage"/>
<output message="typens:sayHelloOutputMessage"/>
</operation>
</portType>
<binding name="TESTBinding" type="typens:TESTPorts">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sayHello">
<soapperation soapAction="http://localhost/test.php"/>
<input ><soap:body use="literal"/></input >
<output><soap:body use="literal"/></output>
</operation>
</binding>
<service name="TESTWebService">
<do***entation>TEST WebService</do***entation>
<port name="TESTPorts" binding="typens:TESTBinding">
<soap:address location="http://localhost/test.php"/>
</port>
</service>
</wsdl:definitions>

RESULT :

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:sayHelloResponse>
<hello>Hello, toto...</hello>
</SOAP-ENV:sayHelloResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Alive!!!!
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

When the query is good => no problem
The probleme is due to the SoapFault...
I tried to catch SoapFault... but without result...
try {
$server->handle("");
} catch (SoapFault $fault) {
echo "SoapFault";
}

I don't know what is the more switable: never stop the process, or
throw Exception...

Regards,

FENDT Charles

------------------------------------------------------------------------

[2005-02-16 09:39:31] cfendt at silicom dot fr

Description:
------------
Hello,

I try to make some DB work after a SoapServer::handle()... but the
script ends!

on the output, we can see the soapFault dump, but no "<!-- Alive!!!!
-->"...

I try it on Win 5.0.1, Win 5.0.3, Win 5.0-CVS (15/2/2005), Win 5.1-CVS
(15/2/2005), OS X 5.0.1 (build from source), OS X 5.0.3 (build from
source)

Reproduce code:
---------------
<?php
$server = new SoapServer(null,
array('uri' => "http://test-uri/"));
$server->handle("");
echo "\r\n<!-- Alive!!!! -->\r\n";
?>

Expected result:
----------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<!-- Alive!!!! -->

Actual result:
--------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=31993&edit=1
  Reply With Quote
7 30th March 05:25
External User
 
Posts: 1
Default #31993 : SoapServer::handle() stops the script


ID: 31993
Updated by: tony2001@php.net
Reported By: cfendt at silicom dot fr
-Status: Assigned
+Status: Feedback
Bug Type: SOAP related
Operating System: WinXp, Mac OS X
PHP Version: 5CVS-2005-03-29
Assigned To: dmitry
New Comment:

Please try using this CVS snapshot:

http://snaps.php.net/php5-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5-win32-latest.zip


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

[2005-03-29 17:41:40] sniper@php.net

Assigning back to Dmitry.


------------------------------------------------------------------------

[2005-03-29 13:47:23] cfendt at silicom dot fr

The script always stops when a soapfault is raised...
No catch possible...

------------------------------------------------------------------------

[2005-03-25 01:22:25] sniper@php.net

Please try using this CVS snapshot:

http://snaps.php.net/php5-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5-win32-latest.zip

------------------------------------------------------------------------

[2005-02-17 09:53:21] cfendt at silicom dot fr

In fact, I use a WSDL file...

CODE :

<?php
class web_service {
function sayHello($input) {
return "Hello, ".$input."...";
}
}

$soap_query =
"<soapenv:Envelope
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>"
. " <soapenv:Body>"
. " <m:sayHello xmlns:m='http://localhost/test.php'>"
. " <m:login>toto</m:login>"
. " </m:sayHello>"
. " </soapenv:Body>"
. "</soapenv:Envelope>";

$server = new SoapServer("./test.wsdl");
$server->setclass("web_service");
$server->handle($soap_query);
echo "\r\nAlive!!!!\r\n";
$server->handle("");
echo "\r\nAlive!!!!\r\n";
?>

WSDL :

<?xml version="1.0"?>
<wsdl:definitions
xmlns:tns="urn:TEST"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:typens="urn:TEST"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:TEST"
name="TEST">
<message name="sayHelloInputMessage">
<part name="login" type="xsd:string"/>
</message>
<message name="sayHelloOutputMessage">
<part name="hello" type="xsd:string"/>
</message>
<portType name="TESTPorts">
<operation name="sayHello">
<input message="typens:sayHelloInputMessage"/>
<output message="typens:sayHelloOutputMessage"/>
</operation>
</portType>
<binding name="TESTBinding" type="typens:TESTPorts">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sayHello">
<soapperation soapAction="http://localhost/test.php"/>
<input ><soap:body use="literal"/></input >
<output><soap:body use="literal"/></output>
</operation>
</binding>
<service name="TESTWebService">
<do***entation>TEST WebService</do***entation>
<port name="TESTPorts" binding="typens:TESTBinding">
<soap:address location="http://localhost/test.php"/>
</port>
</service>
</wsdl:definitions>

RESULT :

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:sayHelloResponse>
<hello>Hello, toto...</hello>
</SOAP-ENV:sayHelloResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Alive!!!!
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

When the query is good => no problem
The probleme is due to the SoapFault...
I tried to catch SoapFault... but without result...
try {
$server->handle("");
} catch (SoapFault $fault) {
echo "SoapFault";
}

I don't know what is the more switable: never stop the process, or
throw Exception...

Regards,

FENDT Charles

------------------------------------------------------------------------

[2005-02-16 09:39:31] cfendt at silicom dot fr

Description:
------------
Hello,

I try to make some DB work after a SoapServer::handle()... but the
script ends!

on the output, we can see the soapFault dump, but no "<!-- Alive!!!!
-->"...

I try it on Win 5.0.1, Win 5.0.3, Win 5.0-CVS (15/2/2005), Win 5.1-CVS
(15/2/2005), OS X 5.0.1 (build from source), OS X 5.0.3 (build from
source)

Reproduce code:
---------------
<?php
$server = new SoapServer(null,
array('uri' => "http://test-uri/"));
$server->handle("");
echo "\r\n<!-- Alive!!!! -->\r\n";
?>

Expected result:
----------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<!-- Alive!!!! -->

Actual result:
--------------
<?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>Bad Request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=31993&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666