|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-02-23 17:12 UTC] robin dot harvey at chaptereight dot com
Description:
------------
I've got a very simple soap service (written in Java/Tomcat/Axis) which simply accepts and logs the XML of a soap request. I need to post complex XML to the server (an XSL stylesheet) and I'm using SoapVar with XSD_ANYXML and dealing with the XSL as a string in PHP. When I try to add more than one SoapVar object encoded in this way, PHP segfaults. It's happy with 1 param as a SoapVar, and with both as simple strings.
Reproduce code:
---------------
<?php
$s = new SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
$data1 = <<<XML
<meta>
<properties>
<of>the transform go here!</of>
</properties>
</meta>
XML;
$data2 = <<<XML
<more>
<nice>Random content</nice>
<being>sent to the soap server</being>
</more>
XML;
$tdata = new SoapVar($data1, XSD_ANYXML);
$t = new SoapVar($data2, XSD_ANYXML);
$data = array('TransformData' => $tdata, 'Transform' => $t);
//$data = array('TransformData' => 'foo', 'Transform' => 'bar');
$s->examine($data);
?>
Expected result:
----------------
NULL. The service is 'In only'
Actual result:
--------------
robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php test-client-joe.php
Segmentation fault (core dumped)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
Hi, I've uploaded the Soap service to an accessible site, and produced a backtrace, as requested. I've not used dbg before, so please let me know if i've done something wrong. I recompiled php with --enable-debug: heres the configure line: './configure' \ '--with-apxs2=/usr/bin/apxs2' \ '--with-zlib' \ '--with-bz2' \ '--with-pdo-mysql' \ '--with-pdo-pgsql' \ '--with-xsl' \ '--with-pear' \ '--enable-soap' \ '--enable-ftp' \ '--with-gd' \ '--enable-mbstring' \ '--enable-sockets' \ '--with-mcrypt' \ '--enable-debug' Here's a copy of the php script I'm using: <?php $xml1 = <<<XML <this> <might>be nice for a <while/> old chum</might> </this> XML; $xml2 = <<<XML <ok> Run it through <dbg/> to see what's going on </ok> XML; $c = new SoapClient('http://bluelines.org:8080/axis2/services/StockQuoteService?wsdl'); $sv1 = new SoapVar($xml1, XSD_ANYXML); $sv2 = new SoapVar($xml2, XSD_ANYXML); $c->update(array('symbol' => $sv1, 'price' => $sv2)); ?> ...and the dbg session, with a backtrace... (gdb) set args /home/robin/tmp/40609.php (gdb) run Starting program: /usr/local/bin/php /home/robin/tmp/40609.php (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread 46912533505280 (LWP 23881)] (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) ---Type <return> to continue, or q <return> to quit--- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46912533505280 (LWP 23881)] 0x0000000000642c51 in encode_add_ns () (gdb) bt #0 0x0000000000642c51 in encode_add_ns () #1 0x0000000000639c62 in to_zval_user () #2 0x0000000000639f42 in to_zval_user () #3 0x000000000063a71d in to_zval_user () #4 0x00000000006420d5 in sdl_guess_convert_xml () #5 0x0000000000634b37 in master_to_xml () #6 0x000000000062c8c6 in add_soap_fault () #7 0x000000000062c781 in add_soap_fault () #8 0x000000000062ba97 in add_soap_fault () #9 0x0000000000624448 in zim_SoapClient_SoapClient () #10 0x0000000000625f40 in zim_SoapClient___call () #11 0x00000000007fd2f8 in zend_call_function () #12 0x0000000000827112 in zend_call_method () #13 0x0000000000830aca in zend_std_call_user_call () #14 0x0000000000834ecd in execute () #15 0x0000000000835daa in execute () #16 0x0000000000834912 in execute () #17 0x000000000080c9e8 in zend_execute_scripts () #18 0x00000000007ae109 in php_execute_script () #19 0x000000000089170a in main () Many thanks, --Robin