Sample application for API 6.0.0
Downloading the archive
Download the archive with sample application:
Pre requirements
Please make sure you set everything up correctly before running the example.
Before start you need follow next steps:
- Create user in Platina
- Make him a participant of administrator group.
- Make him a member of diary.
In what follows, we will refer to it as the secondary user. Secondary user this is the person on behalf of the request is sent.
Check it one more time that we don't forget set value for StandardServiceAuthorizedUser. In what follows, we will refer to it as the Primary user.
Lets start
- Unzip sample package to chosen location.
- Open SampleClient.ContractAssembly.csproj by VisualStudio 2019 or later.
- Navigate to Program.cs
- For each endpoint replace the {The name of the server} with the "hostname" of the Platina server.
- Set to field UserName value of SecondaryUser in format "DOMAIN\UserName".
- Now you must have something like this. For sample application, WS512 is a Platina server's host name and WS512\ApiUser is a secondary user's.
private static EndpointAddress DeedEndpointAddress =
new EndpointAddress("net.tcp://WS512/GeneralWWW/PlatinaService.svc/deedManagement");
private static EndpointAddress DocumentEndpointAddress =
new EndpointAddress(
"net.tcp://WS512/GeneralWWW/PlatinaService.svc/documentManagement");
private static EndpointAddress JCEndpointAddress =
new EndpointAddress("net.tcp://WS512/GeneralWWW/PlatinaService.svc/caseManagement");
static string UserName = $@"WS512\ApiUser";
Run your first method
Navigate to the method "GetDeedMetadata".
Replace propID with your deed propID.
There are code lines a little bit below.
Set the PrimaryUser credentials to the factory, StandardServiceAuthorizedUser should be a windows user (local or domain), and configured in Platina "admin" settings.
factory.Credentials.Windows.ClientCredential.UserName = "{StandardServiceAuthorizedUser}";
factory.Credentials.Windows.ClientCredential.Password = "{password}";
- You must have something like this. For sample application, WS512\TestUser1 is a StandardServiceAuthorizedUser .
factory.Credentials.Windows.ClientCredential.UserName = "WS512\TestUser1";
factory.Credentials.Windows.ClientCredential.Password = "LB[FvC8x$>7&";
- Navigate to the method Main and call GetDeedMetadata.
static void Main(string[] args)
{
GetDeedMetadata();
Console.ReadLine();
}
- Run you application and check console output.
- Repeat it with all other methods that you want to try.