Following is a sample PHP SOAP Client with session, It uses a python WSGI server implemented with ladon
$url = "http://192.168.2.30:5050/RACE/soap/description";
$race = new SoapClient($url, array('trace' => 1));
$race->someSoapFunction('test');
$f = explode("beaker.session.id=",$race->__getLastResponseHeaders());
$s = explode(";",$f[1]);
$race->__setCookie("beaker.session.id",$s[0]);
echo $race->get_string('test');
$url = "http://192.168.2.30:5050/RACE/soap/description";
$race = new SoapClient($url, array('trace' => 1));
$race->someSoapFunction('test');
$f = explode("beaker.session.id=",$race->__getLastResponseHeaders());
$s = explode(";",$f[1]);
$race->__setCookie("beaker.session.id",$s[0]);
echo $race->get_string('test');
No comments:
Post a Comment