Guys,
I've spen the whole day trying to get this SOAP to work to a point that I am all soaped out!!
so any help much appriciated.
i wrote a soap class that does not work for this specific request. the raw soap envelop looks like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:log="SilverpopApi:EngageService.SessionMgmt.Login">
<soapenv:Body>
<log:Login>
<log:USERNAME>
[email protected]</log:USERNAME>
<log:PASSWORD userpassword</log:PASSWORD>
</log:Login>
</soapenv:Body>
</soapenv:Envelope>
my current code returns exception->Wrong Version. Now i figured that I am not passing the header, I've been playing with soapVar and SoapHeader at no joy.
so here is my php:
class comsumewsdl {
public $username="xxxx";
public $password="xxxx";
public $parameters;
public function dorequest(){
//$client = new SoapClient("http://api5.silverpop.com/SoapApi?wsdl", array('trace' => 1));
$client = new SoapClient(null, array(
"location" => "http://api5.silverpop.com/SoapApi?wsdl",
"uri" => "http://schemas.xmlsoap.org/soap/envelope/",
"uri" => "SilverpopApi:EngageService.SessionMgmt.Login",
"trace" => 1 )
);
$this->parameters = array('USERNAME'=>$this->username, 'PASSWORD'=>$this->password);
try {
$response = $client->__soapCall("Login", $this->parameters);
echo "<pre>\n";
echo htmlentities ($response);
echo "\n";
}
catch(Exception $exception){
//$call=$client->__getRequest($response);
echo $client->__getLastRequest();
echo 'General Exception: ', $exception->getMessage();
exit;
}
}
}
$callclass = new comsumewsdl();
$callclass->dorequest();