Navigation:  Integration via SOAP web services > Technical overview >

Basic HTTP authentication

Previous  Top  Next

It is necessary to make the request to API Gateway by passing in the request header the Authorization parameter, containing as value the word "Basic", <blank space>, user login and password separated by ":" (colon) in the base64 encoding format:

 

Authorization = Basic base64encode(<login>:<password>)

 

Example for user "sesuite" and password "111111":

User: sesuite

Password: 111111

Must be converted to base64: sesuite:111111

Result of the conversion: c2VzdWl0ZToxMTExMTE=

Token to be used: Authorization

Token value: Basic c2VzdWl0ZToxMTExMTE=

 

The SoapUI is a tool used for testing web service applications. Below is an example of how to use the header in SoapUI:

 

soapui_basic_zoom80

 

The SoapUI tool also offers a facilitator for this basic authentication. To express this simpler method, see the image below:

 

soapui_basic_easy_zoom80

 

Note: For the creation of the connection php file, it is necessary to insert the WSDL address through the location tag for the connection as in the example below:

// WSDL URL

$wsdl = "https://$server/se/ws/dc_ws.php?wsdl";

$location = "https://$server/apigateway/se/ws/content.php";

 

// Instantiates a SOAP client

$client = new SoapClient($wsdl,array(

"trace" => 1, // Enables the trace

"exceptions" => 1, // Treats the exceptions

"login" => $user,

"password" => $pass,

"stream_context"=>stream_context_create($context),

"location" => $location

));