The most common authentication method is using the TBasicSecurity for authentication where you need to supply a username and passwordStep-by-step guide
Example using C#
var client = new IItemServiceservice() { BasicSecurityValue = new BasicSecurity() { Username = "myuser", Password = "mypass" } };
Example using Delphi
function TMedicorThread.GetWsInterface : IItemService; var sec : BasicSecurity; begin TimeOut := 180000; result := GetIItemService(false,fWebserviceURL); sec := BasicSecurity.Create; sec.Username := fUserName; sec.Password := fPassword; result as ISOAPHeaders).Send( sec ); end;
Example using PHP
$BS = new BasicSecurity(); $BS->Username = "MyUsr"; $BS->Password = "MyPass"; $client = new SoapClient("file://C:/TestClient/dkWSDL_4_2_0.wsdl" ,array("soap_version" => SOAP_1_1, "trace" => 1, "cache_wsdl" => WSDL_CACHE_NONE)); $Header = new SoapHeader("urn:dkWSValueObjects","BasicSecurity" , $BS, false); $client->__setSoapHeaders($Header);
Related articles