This project is no longer maintained and will not receive any further updates. If you plan to continue using it, please be aware that future security issues will not be addressed.
Description • Installation • Usage • License
This project was created initially during the 2019th GSoC.
Its purpose is mainly to allow users to integrate the WPS standard in their program seamlessly without having to reimplement the specification every time. The library was built in C# to integrate with the .NET ecosystem. It is easily extensible and featureful providing the users the two main implementation of execution types, synchronous and asynchronous.
You can get the package from NuGet.
dotnet add package WPS.NET
Install-Package WPS.NET
var client = new WpsClient(httpClient, xmlSerializer);
var capabilities = await client.GetCapabilities("server.uri");
var client = new WpsClient(httpClient, xmlSerializer);
var processOfferings = await client.DescribeProcess("server.uri", "process identifier");
var request = new ExecuteRequest
{
Identifier = "process identifier",
Inputs = new[]
{
new DataInput
{
Identifier = "input identifier",
Data = new LiteralDataValue{ Value = "test" }
}
},
Outputs = new[]
{
new DataOutput
{
Identifier = "output identifier"
}
},
ExecutionMode = ExecutionMode.Synchronous,
ResponseType = ResponseType.Raw
};
var client = new WpsClient(httpClient, xmlSerializer);
var session = await client.AsyncGetDocumentResultAs<YourResultDataType>("server.uri", request);
var pollingTask = session.StartPolling();
session.Finished += (sender, args) => { /* Use the result here. */ };
session.Failed += (sender, args) => { /* The execution has failed. */ };
session.Polled += (sender, args) => { /* The sesssion poller has checked for the status. */ };