I am new to SOAP and I've used REST API before, I know that you need to register an API client for integrations in order to obtain an access token and not require any user interaction, I want to do something similar to that in SOAP, but I'm afraid I'm not an expert on how it works.
I currently have this code in C# on visual studio
string url = "https://[baseURL]/ccx/service/GSU/Human_Resources/v41.2"; //Sandbox tenant
string userName = "ISU_CLIENT_PORTAL_USER@GSU";
string password = [password];
//Instantiate an instance of WCF generated proxy and set the Endpoint
Human_ResourcesPortClient hr = new Human_ResourcesPortClient();
hr.Endpoint.Address = new EndpointAddress(url);
//Specify the username and password for WS-Security UsernameToken Header
hr.ClientCredentials.UserName.UserName = userName;
hr.ClientCredentials.UserName.Password = password;
//Instantiate Header for the request
Workday_Common_HeaderType header = new Workday_Common_HeaderType();
header.Include_Reference_Descriptors_In_Response = false;
header.Include_Reference_Descriptors_In_ResponseSpecified = false;
//Setting up soapRequest criteria to use Country
Get_Workers_RequestType soapRequest = new Get_Workers_RequestType();
Worker_Request_CriteriaType requestCriteria = new Worker_Request_CriteriaType();
CountryObjectIDType[] us = new CountryObjectIDType[1];
us[0] = new CountryObjectIDType() { type = "ISO_3166-1_Alpha-2_Code", Value = "US" };
CountryObjectType[] country = new CountryObjectType[1];
country[0] = new CountryObjectType() { ID = us };
requestCriteria.Country_Reference = country;
//Setting up filter to get data for 5 workers
Response_FilterType responseFilter = new Response_FilterType();
responseFilter.Count = 5;
responseFilter.CountSpecified = true;
Worker_Response_GroupType responseGroup = new Worker_Response_GroupType();
responseGroup.Include_Reference = true;
responseGroup.Include_Personal_Information = true;
responseGroup.Include_Compensation = true;
responseGroup.Include_Employment_Information = true;
responseGroup.Include_ReferenceSpecified = true;
responseGroup.Include_Personal_InformationSpecified = true;
responseGroup.Include_CompensationSpecified = true;
responseGroup.Include_Employment_InformationSpecified = true;
//updating preferences for the soapRequest
//soapRequest.Request_Criteria = requestCriteria;
soapRequest.Response_Filter = responseFilter;
soapRequest.Response_Group = responseGroup;
soapRequest.version = "v41.2";
//Invoke HR getworker api via Proxy
var workers = hr.Get_Workers(header, soapRequest);
The username passed has to be of type [ISU]@[Tenant] The ISU has to have permissions to access the resources, which we have granted already as this user has access to many security groups and permissions The ISU has to be part of the same tenant of the base URL The authentication type I am using is basic, so just username and password should suffice So I am still not sure what I'm doing wrong , maybe something on the code? also I want to know if this is the best approach or if I should use an access token instead. Can anybody provide a sample request in C# on how to get workers