Edit report at https://bugs.php.net/bug.php?id=55348&edit=1

 ID:                 55348
 Comment by:         chris at cmbuckley dot co dot uk
 Reported by:        sprotte at visionconnect dot de
 Summary:            SoapServer (typemap related) "Error calling from_xml
                     callback"
 Status:             Open
 Type:               Bug
 Package:            SOAP related
 Operating System:   openSUSE 11.4
 PHP Version:        5.3.7RC4
 Block user comment: N
 Private report:     N

 New Comment:

Regardless of the Xdebug comment, the error is still present without Xdebug; if 
the from_xml callback generates an error more than once during server handling, 
the error message "Error calling from_xml callback" is shown instead of the 
actual fault.


Previous Comments:
------------------------------------------------------------------------
[2011-08-23 12:26:15] der...@php.net

There is an incompatibility with Xdebug and the SOAP extension, due to the way 
that the SOAP extension also overloads php_error_cb. In order to properly fix 
this, the error_cb overloading needs to be changed. I don't however know, 
exactly how.
See also: 
http://bugs.xdebug.org/view.php?id=609
http://bugs.xdebug.org/view.php?id=705

------------------------------------------------------------------------
[2011-08-23 11:19:45] chris at cmbuckley dot co dot uk

Additional: Fatal only happens in conjunction with Xdebug (see 
https://bugs.php.net/bug.php?id=50547).

------------------------------------------------------------------------
[2011-08-22 19:48:28] chris at cmbuckley dot co dot uk

Description:
------------
Reduced to smaller test script.

Test script:
------------

http://starsquare.co.uk/code/php/bugs/55348.phps

Expected result:
----------------

...
<SOAP-ENV:Fault>
  <faultcode>SOAP-ENV:Server</faultcode>
  <faultstring>Conversion Fault</faultstring>
</SOAP-ENV:Fault>
...

Actual result:
--------------

Fatal error: SOAP-ERROR: Encoding: Error calling from_xml callback

------------------------------------------------------------------------
[2011-08-02 15:14:41] sprotte at visionconnect dot de

Description:
------------
Throwing a SoapFault exception inside the from_xml callback function (when 
using the "typemap" feature with SoapServer) does not work as expected in some 
cases.

I have created a small client/server application with one working example (type 
"date") and one not working example (type "myType").

In case of the "date" type the SoapFault exception is transformed into a 
matching SOAP-Response. The original message is available on the client side.
In case of the "myType" type the thrown SoapFault exception is completely 
ignored and the SOAP-Response contains another error message.


Test script:
---------------
http://www.visionconnect.de/php_bugreports/soapserver_to_xml.tar.gz

Expected result:
----------------
Faultcode: 0001
Faultstring: Invalid date: 2011-15-15
Faultcode: 0002
Faultstring: Invalid type: foobar


Actual result:
--------------
Faultcode: 0001
Faultstring: Invalid date: 2011-15-15
Faultcode: SOAP-ENV:Server
Faultstring: SOAP-ERROR: Encoding: Error calling from_xml callback



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



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=55348&edit=1

Reply via email to