I need to connect to a web service that requires credentials for authentication in the form of a username and password.
I have a basic understanding of SOAP and have been able to connect to other open web services that do not require a username or password using NuSOAP.
I was sent the following:
<?php
$security_options = array("useUsernameToken" => TRUE);
$policy = new WSPolicy(array("security" => $security_options));
$security_token = new WSSecurityToken(array(
"user" => "xxx",
"password" => "xxx",
"passwordType" => "basic"));
$client = new WSClient(array("wsdl" => "https://xxx.asmx?wsdl",
"action" => "http://xxx",
"to" => "https://xxx",
"useWSA" => 'submission',
"CACert" => "cert.pem",
"useSOAP" => 1.1,
"policy" => $policy,
"securityToken" => $security_token));
$proxy = $client->getProxy();
$input_array = array("From" => "2010-01-01 00:00:00",
"To" => "2010-01-31 00:00:00");
$resMessage = $proxy->xxx($input_array);
?>
After some research, I understand that the above implementation uses wso2. I need to do this without using wso2.
I tried my best to look for resources (Google, forums, etc.) about this, but could not find anything. I read several SOAP tutorials and was able to configure the SOAP client using PHP, but I canβt get around all the authentication and policies.
, , , , , ! , SOAP.
. P.S / xxx'd .