#49169 [Com]: SoapServer calls wrong function, although SOAP action header is correct

2009-09-23 Thread robin dot harvey at chaptereight dot com
 ID:   49169
 Comment by:   robin dot harvey at chaptereight dot com
 Reported By:  jeroen at asystance dot nl
 Status:   Verified
 Bug Type: SOAP related
 Operating System: linux
 PHP Version:  5.2SVN-2009-08-05 (snap)
 New Comment:

@bigdan at gmail dot com

The workaround I'm using is to set up my WSDL so that all methods have
a unique input type signature.  Of course this leads to an ugly and
unnecessarily bloated WSDL, but there's not much other choice (other
than WS02 PHP, that is)


Previous Comments:


[2009-09-18 14:10:39] jeroen at asystance dot nl

bigdan, I think you left out one option: this _is_ a bug.

Using RPC style _is_ a workaround, but one that doesn't always work.

The real problem is that SOAP should use the SOAPAction header to
determine which operation to call, not guess based on parameters (which
is what it looks to be doing now).

While the comment you refer to does point out this very issue and
predates this bug, that doesn't mean it's not a bug. Rather the
commenter could (and should?) have filed this as a bug more than a year
ago.



[2009-09-18 13:51:18] bigdan at gmail dot com

Nevermind on the workaround - either this is not a bug, this issue was
noticed well before this bug, or the comments here are entirely
unrelated though they correct the issue for me:

http://us3.php.net/manual/en/soapserver.handle.php#81750

TLDR: Instead of soap:binding style=document you need to use
soap:binding style=rpc



[2009-09-18 13:45:30] bigdan at gmail dot com?

Is anyone aware of a workaround? I am having this issue on Ubuntu
Hardy.

Thanks



[2009-09-09 19:27:50] sjo...@php.net

Could reproduce. Even though the soap action looked as follows:
SOAPAction: operation2
Operation 1 was called.



[2009-08-20 15:18:33] robin dot harvey at chaptereight dot com

Hi,

This bug is affecting me too, and I've noticed that it's only the input
parameters which trigger the bug - 2 functions can have the same output
and they are treated individually.

Also, it seems that it's the order of the wsdl:binding/wsdl:operation
declarations which makes a difference, swapping the
wsdl:portType/wsdl:operation or wsdl:message ordering does not trigger
the bug.

HTH
--Robin



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/49169

-- 
Edit this bug report at http://bugs.php.net/?id=49169edit=1



#49169 [Com]: SoapServer calls wrong function, although SOAP action header is correct

2009-08-20 Thread robin dot harvey at chaptereight dot com
 ID:   49169
 Comment by:   robin dot harvey at chaptereight dot com
 Reported By:  jeroen at asystance dot nl
 Status:   Open
 Bug Type: SOAP related
 Operating System: linux
 PHP Version:  5.2SVN-2009-08-05 (snap)
 New Comment:

Hi,

This bug is affecting me too, and I've noticed that it's only the input
parameters which trigger the bug - 2 functions can have the same output
and they are treated individually.

Also, it seems that it's the order of the wsdl:binding/wsdl:operation
declarations which makes a difference, swapping the
wsdl:portType/wsdl:operation or wsdl:message ordering does not trigger
the bug.

HTH
--Robin


Previous Comments:


[2009-08-05 11:13:06] jeroen at asystance dot nl

The correct link to the test case is http://jayvee.nl/soaptest2.tar
(without the comma)



[2009-08-05 11:11:00] jeroen at asystance dot nl

Description:

When two wsdl:operations have the same API (that is, have the same
wsdl:messages), the SoapServer calls the function corresponding to the
_first_ wsdl:operation specified in the wsdl:binding, even although
the SoapClient sends the correct SOAP action header, which is
correctly received on the server.

Reproduce code:
---
Download http://jayvee.nl/soaptest2.tar, untar and change the URL in
interface.wsdl

call SAOPTest.php, which is both a client and server. The server will
produce a log that the client outputs, so you can see what the server is
doing.



Expected result:

Independent of the order in which the wsdl:operations are listed in
the wsdl:binding element, the SoapServer should call the function
corresponding to the SOAP action header specified in the request.

Actual result:
--
The SoapServer always calls the function corresponding to the _first_
wsdl:operation specified.

In the test case, the server will call function operation1() twice,
even though the second call is to operation2, and the SOAP action
header's value is operation2

To verify, switch the wsdl:operation elements in the wsdl:binding
element and run SOAPTest.php.

You will see that the server will call function operation2() twice,
even though the SOAP action headers are different.





-- 
Edit this bug report at http://bugs.php.net/?id=49169edit=1



#40609 [Csd]: Segfaults when using more than one SoapVar in a request

2007-02-26 Thread robin dot harvey at chaptereight dot com
 ID:   40609
 User updated by:  robin dot harvey at chaptereight dot com
 Reported By:  robin dot harvey at chaptereight dot com
 Status:   Closed
 Bug Type: SOAP related
 Operating System: Linux - Ubuntu
 PHP Version:  5.2.1
 Assigned To:  dmitry
 New Comment:

Thanks for sorting this out so quickly guys - the fix works perfectly!

--Robin


Previous Comments:


[2007-02-25 13:25:23] [EMAIL PROTECTED]

Fixed in CVS HEAD and PHP_5_2.
Thanks to Rob.




[2007-02-24 14:08:31] robin dot harvey at chaptereight dot com

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
mightbe 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)]
0x00642c51 in encode_add_ns ()
(gdb) bt
#0  0x00642c51 in encode_add_ns ()
#1  0x00639c62 in to_zval_user ()
#2  0x00639f42 in to_zval_user ()
#3  0x0063a71d in to_zval_user ()
#4  0x006420d5 in sdl_guess_convert_xml ()
#5  0x00634b37 in master_to_xml ()
#6  0x0062c8c6 in add_soap_fault ()
#7  0x0062c781 in add_soap_fault ()
#8  0x0062ba97 in add_soap_fault ()
#9  0x00624448 in zim_SoapClient_SoapClient ()
#10 0x00625f40 in zim_SoapClient___call ()
#11 0x007fd2f8 in zend_call_function ()
#12 0x00827112 in zend_call_method ()
#13 0x00830aca in zend_std_call_user_call ()
#14 0x00834ecd in execute ()
#15 0x00835daa in execute ()
#16 0x00834912 in execute ()
#17 0x0080c9e8 in zend_execute_scripts ()
#18 0x007ae109 in php_execute_script ()
#19 0x0089170a in main ()


Many thanks,
--Robin



[2007-02-23 17:48:16] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.

An accessible WSDL might also be helpful



[2007-02-23 17:12:38] 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

#40609 [Fbk-Opn]: Segfaults when using more than one SoapVar in a request

2007-02-24 Thread robin dot harvey at chaptereight dot com
 ID:   40609
 User updated by:  robin dot harvey at chaptereight dot com
 Reported By:  robin dot harvey at chaptereight dot com
-Status:   Feedback
+Status:   Open
 Bug Type: SOAP related
 Operating System: Linux - Ubuntu
 PHP Version:  5.2.1
 New Comment:

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
mightbe 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)]
0x00642c51 in encode_add_ns ()
(gdb) bt
#0  0x00642c51 in encode_add_ns ()
#1  0x00639c62 in to_zval_user ()
#2  0x00639f42 in to_zval_user ()
#3  0x0063a71d in to_zval_user ()
#4  0x006420d5 in sdl_guess_convert_xml ()
#5  0x00634b37 in master_to_xml ()
#6  0x0062c8c6 in add_soap_fault ()
#7  0x0062c781 in add_soap_fault ()
#8  0x0062ba97 in add_soap_fault ()
#9  0x00624448 in zim_SoapClient_SoapClient ()
#10 0x00625f40 in zim_SoapClient___call ()
#11 0x007fd2f8 in zend_call_function ()
#12 0x00827112 in zend_call_method ()
#13 0x00830aca in zend_std_call_user_call ()
#14 0x00834ecd in execute ()
#15 0x00835daa in execute ()
#16 0x00834912 in execute ()
#17 0x0080c9e8 in zend_execute_scripts ()
#18 0x007ae109 in php_execute_script ()
#19 0x0089170a in main ()


Many thanks,
--Robin


Previous Comments:


[2007-02-23 17:48:16] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.

An accessible WSDL might also be helpful



[2007-02-23 17:12:38] 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
ofthe transform go here!/of
/properties
/meta
XML;

$data2 = XML
more
niceRandom content/nice
beingsent to the soap server/being
/more
XML;

$tdata = new SoapVar($data1

#40609 [NEW]: Segfaults when using more than one SoapVar in a request

2007-02-23 Thread robin dot harvey at chaptereight dot com
From: robin dot harvey at chaptereight dot com
Operating system: Linux - Ubuntu
PHP version:  5.2.1
PHP Bug Type: SOAP related
Bug description:  Segfaults when using more than one SoapVar in a request

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
ofthe transform go here!/of
/properties
/meta
XML;

$data2 = XML
more
niceRandom content/nice
beingsent 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:
--
[EMAIL PROTECTED]:~/projects/buddy/tomcat/soap2$ php test-client-joe.php

Segmentation fault (core dumped)

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