Hi,
I've been trying to work out how I can access SOAP headers from the Soap Server.
Firstly to explain my setup (and go slightly off topic). My soap server is filled with functions rather than a class and I use the addFunction method to tell the server to handle them. I notice most of the examples now have a class defined with methods and then using setClass method. Should I move to doing it this way? Am I right in thinking you can only have one class handling soap requests? If I have no need for the persistence are there any other advantages to doing it this way.
Ok, onto headers. I know how to add a header to the soap request, what I don't know is how, at the Server end, I can then use the data from the header.
I saw a post mentioning the example in ext/soap/tests/soap12 but have to say it wasn't quite what I expected and didn't make much sense to me. I wasn't sure if perhaps this is due to the way I use the server (functions rather than class - see above).
Sorry if this post isn't very clear, I'm fairly new to soap and so might have the wrong end of the stick (or a completely different stick altogether).
Cheers,
Alex
I've found that using the class method of holding onto SOAP function works exceptionally well and is far easier to maintain. I haven't tried it yet, but I suppose as an intermediate step, you could have SOAP use your class and then add your other functions in the way you're doing now until you have everything stored in a class.
I'm not sure if you could have more than one class defining functions from a SOAP WSDL file if you go the class route.
-- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php