Specifying SOAP Headers for a Zend_Soap Service

Posted by Stephen on Stack Overflow See other posts from Stack Overflow or by Stephen
Published on 2010-01-08T15:43:46Z Indexed on 2010/05/15 20:04 UTC
Read the original article Hit count: 216

Filed under:
|
|
|

I have a generally straight forward web service that I've written (converting code to ZF from a Java implementation of the same service and trying to maintain the same wsdl structure as much as possible). The service loads a PHP class, rather than individual functions. The PHP class contains three different functions within it.

Everything seems to be working just fine, except that I can't seem to figure out how to specify that a given function parameter should be passed as a SOAP header. I've not seen any mention of SOAP headers in the Server context, only how to pass header parameters with a client to a server.

In addition to the standard parameters for the function that would be sent in the SOAP body and detailed in the docblock, I would like to specify two parameters (a username and password) that would be sent in a SOAP header.

I have to assume this is possible, but haven't been able to find anything online, nor have I had any responses to a similar post on Zend's forum. Is there something that can be added in the docblock area to specify a parameter as a header (maybe in a similar fashion to using WebParam?)? Any suggestions/examples on how to get this accomplished would be greatly appreciated!

© Stack Overflow or respective owner

Related posts about php

Related posts about zend