Im working on an existing Windows Service project in VS 2013.
I've added a web API Controller class I cant remember now if its a (v2.1) or (v1) controller class....Anyway I've called it SynchroniseFromAwsService
Im trying to call it from a AWS lambda call but it is telling me I dont have access. So I need to test it locally to see if it is working to try and diagnose the issue.
I want to test this locally but am unsure how to do so..please see code...
namespace Workflow
{
public class SynchroniseFromAwsService: ApiController
{
//// POST api/<controller>
public string SapCall([FromBody]string xmlFile)
{
string responseMsg = "Failed Import User";
if (!IsNewestVersionOfXMLFile(xmlFile))
{
responseMsg = "Not latest version of file, update not performed";
}
else
{
Business.PersonnelReplicate personnelReplicate = BusinessLogic.SynchronisePersonnel.BuildFromDataContractXml<Business.PersonnelReplicate>(xmlFile);
bool result = Service.Personnel.SynchroniseCache(personnelReplicate);
if (result)
{
responseMsg = "Success Import Sap Cache User";
}
}
return "{\"response\" : \" " + responseMsg + " \" , \"isNewActiveDirectoryUser\" : \" false \"}";
}
}
}
I've read on google to download a program called Postman and test it.
Is there nothing I can call in VS and just pass in a dummy data string containing an xml file to test?
What would be the best way
thank you for any replied