SOAP with headers ...

windows

Guest
... unless you can think of a better way.
Background:
I'm trying to build a dynamic webservices framework (you can check out the beginings here (<!-- m --><a class="postlink" href="http://www.phpbuilder.com/board/showthread.php?s=&threadid=10282809">http://www.phpbuilder.com/board/showthr ... d=10282809</a><!-- m -->)) which runs on handler classes which extend the ProtocolHadler abstract class. The problem I am having is with building a SOAPHandler class (well actually not the class itself but anyway).
This is what I have so far for the class.

require_once 'ProtocolHandler.class.php';

class SOAPHandler extends ProtocolHandler {
private $cmd;

function __construct($module) {
parent::loadModule($module);
}

function __call($method, $arguments) {
$this->cmd=$method;
return parent::executeFunction($this->cmd, $arguments);
}
}


What I'm really having difficulty with is how to implement it.

$server = new SoapServer(null, array('uri'=>'http://som.url.com/somthing'));
$server->setClass('SOAPHandler', $module);
$server->handle();

Which is all well and good (so long as __call works as I expect it to but that's for later) except for the fact that $module needs to be retrieved from the client. I'm thinking that the obvious place to put this kind of data would be in a SOAP-HEADER but I can't seem to figure out how to add SOAP headers with SoapClient or read them with SoapServer.

I did think that I could read $GLOBALS['HTTP_RAW_POST_DATA'] with DOM and get the header like that but I'm thinking that would be really really hard. Besides, it wouldn't address the SoapClient issue.

If anyone can think of another way of tackling the problem, without SOAP headers, then please let me know.

Thanks
Bubble
 
Back
Top