|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #38309 SoapServer doesn't seem capable of processing SOAP Headers
Submitted: 2006-08-03 09:53 UTC Modified: 2007-02-24 21:53 UTC
Avg. Score:4.2 ± 0.9
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:0 (0.0%)
From: hummel at channeladvisor dot de Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.1.4 OS: Windows
Private report: No CVE-ID:
 [2006-08-03 09:53 UTC] hummel at channeladvisor dot de
The SoapServer class doesn't seem to support processing SOAP Headers.

An example SOAP request to the server looks as this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:SOAP-ENC="" xmlns:xsi="" xmlns:xsd="">
		<m:RequesterCredentials xmlns:m="http://localhost/3.0.2/soap/">
		<m:GetAvailableStockQuantityRequest xmlns:m="http://localhost/3.0.2/soap/">

As you can see, the header "RequesterCredentials" is sent to the server. I need to process and validate "RequesterCredentials" on the server side, but the class SoapServer doesn't seem to support of processing headers (i.e. I cannot implement header checks if I wanted to using SoapServer).

If a developer can use SoapServer to process headers, it is a documentation issue. 

If a developer cannot use SoapServer to process headers, it should made clear within the documentation.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-03 09:56 UTC]
Please try using this CVS snapshot:
For Windows:

 [2006-08-03 10:04 UTC] hummel at channeladvisor dot de
Hello Tony,

is there a (pre-)documentation for 5.2 available?
 [2006-08-03 10:18 UTC]
All docs are available @
There shouldn't be any differencies in SOAP except for bugfixes.
 [2006-08-03 12:06 UTC] hummel at channeladvisor dot de
I guess my request was not clear.

A developer can register SOAP functions via calling

$server = new SoapServer("<somewsdl>");

but there seems no method to do


Given my example above, I want to process the header "RequesterCredentials", so I would have to do something like


It is not documented wether header processing is possible using SoapServer or not.
 [2006-08-03 12:22 UTC]
If it's not documented - it is not possible.
Please express your thoughts more clearly next time.
Thank you.
 [2006-08-03 12:34 UTC] hummel at channeladvisor dot de
Dear Tony,

after reading my initial request, it is certainly clear what my request was. 

However, it should be documented that processing SoapHeaders within a SoapServer is not possible.
 [2006-08-03 13:00 UTC]
Please explain - what exactly should be documented?
The fact that there is no such function?
 [2006-08-03 13:13 UTC] hummel at channeladvisor dot de
On the documentation page

add the following note below the existing note:

Note: You cannot process SOAP headers using addFunction. The only way to process SOAP headers is to extract them via $HTTP_RAW_POST_DATA and process them before calling SoapServer->handle().
 [2007-02-24 21:53 UTC]
Processing headers is nothing to do with addFunction(). This isn't really a documentation issue because there is no function to process headers. I'm going to close this as a documentation issue. If you want to request it as a feature, reopen as a feature request.
 [2010-07-25 00:53 UTC] ruben at messwithyou dot com
Please reopen this as a feature request, 

Being able to process the send headers would be a lot better for sending meta data 
along which I need!
 [2013-11-18 22:03 UTC] markfb at vorensys dot com
The fact that you can't process soap headers via addFunction() seems like a glaring omission to me. I've just wasted a lot of time figuring this out and I agree that it should be handled either via a feature request or by clearly stating this limitation in the documentation.
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 14:01:35 2015 UTC