Skip to content

mhogeweg/wps.net

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPS.NET

DescriptionInstallationUsageLicense

WPS.NET

Description

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.

Installation

You can get the package from NuGet.

.NET CLI

dotnet add package WPS.NET

Packet Manager

Install-Package WPS.NET

Usage

Getting the server capabilities

var client = new WpsClient(httpClient, xmlSerializer);
var capabilities = await client.GetCapabilities("server.uri");

Describing a process

var client = new WpsClient(httpClient, xmlSerializer);
var processOfferings = await client.DescribeProcess("server.uri", "process identifier");

Creating a request

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
};

Executing a request

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. */ };

License

Apache v2.0

About

This repository contains a .NET WPS client for ArcGIS Pro.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%