Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.14.0

Bug #2656 soap headers get clobbered in $wsdl->[bindings]...
Submitted: 2004-11-01 08:30 UTC
From: byrne at majordojo dot com Assigned:
Status: No Feedback Package: SOAP
PHP Version: 4.3.9 OS: Fedora Core Development Release
Roadmaps: (Not assigned)    

 [2004-11-01 08:30 UTC] byrne at majordojo dot com
Description: ------------ When a WSDL file such as's file declares a SOAP header element like so: <operation name="create"> <soap:operation soapAction=""/> <input> <soap:header use="literal" message="tns:Header" part="SessionHeader"/> <soap:header use="literal" message="tns:Header" part="CallOptions"/> <soap:header use="literal" message="tns:Header" part="SaveOptions"/> <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/> <soap:body parts="parameters" use="literal"/> </input> <output> <soap:body use="literal"/> </output> <fault name="InvalidSObjectFault"> <soap:fault name="InvalidSObjectFault" use="literal"/> </fault> <fault name="UnexpectedErrorFault"> <soap:fault name="UnexpectedErrorFault" use="literal"/> </fault> </operation> When this happens the logic in SOAP/WSDL.php for setting the input/body element clobbers the previous headers array. Here is a patch that fixes this problem (apply to SOAP-0.8RC3): === CUT HERE === 1194,1195c1194,1195 < $this->wsdl->bindings[$this->currentBinding] < ['operations'][$this->currentOperation][$this->opStatus] = $attrs; --- > $newarray = array_merge($this->wsdl->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus],$attrs); > $this->wsdl->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $newarray; === CUT HERE ===


 [2005-09-14 13:22 UTC] pear at public dot alixta dot org
Is this a bug? Any chance it could be confirmed? I am working with pear::soap an am having a few difficulties - would be nice to what is/isn't working as expected. Cheers Alistair
 [2007-06-27 11:41 UTC] acmpires (Carlos Pires)
In my case, the patch that make this work is: --- WSDL.php.orig 2007-06-26 18:56:54.000000000 +0100 +++ WSDL.php 2007-06-27 12:40:24.000000000 +0100 @@ -1468,8 +1468,18 @@ // part - optional. listed parts must appear in body, missing means all parts appear in body // use - required. encoded|literal // encodingStyle - optional. space seperated list of encodings (uri's) - $this->wsdl->bindings[$this->currentBinding] + if (isset($this->wsdl->bindings[$this->currentBinding] + ['operations'][$this->currentOperation][$this->opStatus]['headers'])) { + $headers = $this->wsdl->bindings[$this->currentBinding] + ['operations'][$this->currentOperation][$this->opStatus]['headers']; + $this->wsdl->bindings[$this->currentBinding] + ['operations'][$this->currentOperation][$this->opStatus] = $attrs; + $this->wsdl->bindings[$this->currentBinding] + ['operations'][$this->currentOperation][$this->opStatus]['headers'] = $headers; + } else { + $this->wsdl->bindings[$this->currentBinding] ['operations'][$this->currentOperation][$this->opStatus] = $attrs; + } break; case 'fault': The other patch removes the output, in my case.
 [2008-07-15 13:31 UTC] yunosh (Jan Schneider)
Can you provide a test case for this problem, or at least a WSDL file or link that helps reproducing this?
 [2008-08-04 08:39 UTC] yunosh (Jan Schneider)
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you.