Проекты

WCF Server

The main purpose of this module is to remotely automate the activities of other plugins. Based on REST or SOAP protocol you can call other public member plugin loaded remotely. Stop, Start, invoke some action or collect telemetry data in working process.

Warning! This plugin is based on WCF technology, considering that WCF technology only available from .NET 3.5 to .NET 4.8 and partially restored only in .NET 7, there can be problems while transferring applications to .NET Core versions.

Due to the dynamics and strong typing of the SOAP protocol, the response and the array of arguments are passed in the REST format.

Configuration

  • Host Url http://{ipAddress}:8080 — Link where public access host will be available. Default link for SOAP will be of the form: http://{ipAddress}:8080/soap
  • Service Type REST — Used protocols available to interact with other plugins inside of running host. By default REST protocol is used. You can launch Can be run on the same host as both, and one protocol. If none of the supported protocol not selected, then plugin will start to search IPC protocol to connect to different host instance and will not launch public server host.

REST Endpoints

  • Get array of host identifiers (Identifiers are equals to process identifiers), where WCF Server plugin is loaded.

    Url: http://{ipAddress}:8080/Instance
    Method: GET
    Result: [63464,13488]
  • Get the list of plugins loaded in primary SAL host (Who is attached to host url). If host identifier is specified, then host will redirect request to other instance by IPC protocol

    Url: http://{ipAddress}:8080/Plugins or http://{ipAddress}:8080/{instanceId}/Plugins
    Method: GET
    Result: [{"Company":"{AssemblyCompanyAttribute}","Copyright":"{AssemblyCopyrightAttribute}","Description":"{AssemblyDescriptionAttribute}","ID":"{GuidAttribute}","Name":"{AssemblyTitleAttribute}","Source":"{Physical file path}","Version":{"_Build":7660,"_Major":1,"_Minor":0,"_Revision":42700}},...]
  • Get information about public members of loaded plugins in the instance

    Url: http://{ipAddress}:8080/Plugins/{GuidAttribute} или http://{ipAddress}:8080/{instanceId}/Plugins/{GuidAttribute}
    Method: GET
    Result: {"Members":[{"ReturnType":null,"Parameters":null,"Name":"{MethodName}","TypeName":"{Namespace.ClassName}","MemberType":"Method"},{"Name":"{PropertyName}","TypeName":"{PropertyType}","MemberType":"Property"},...]}
  • Invoke method or property without arguments and receive result

    Url: http://{ipAddress}:8080/Plugins/{GuidAttribute}/{MethodName/PropertyName} или http://{ipAddress}:8080/{instanceId}/Plugins/{GuidAttibute}/{MethodName/PropertyName}
    Method: GET
    Result: HTTP 200 OK or serialized result of method invocation or FaultException
  • Invoke method or property with arguments

    Url: http://{ipAddress}:8080/Plugins/{GuidAttribute}/{MethodName/PropertyName} or http://{ipAddress}:8080/{instanceId}/Plugins/{GuidAttibute}/{MethodName/PropertyName}
    Method: POST
    Payload: {"{Argument1Name}":"{Argument1Value}","{Argument2Name}":"{Argument2Value}",...}
    Result: HTTP 200 OK or serialized result of method invocation or FaultException

SOAP Endpoints

WSDL and all SOAP methods are available by URL: http://{ipAddress}:8080/soap

  • GetPlugins — Get list of all plugins in main instance who currently loaded at host url
    Result: Array of loaded plugins
  • GetPlugin — Get information of single plugin by identifier. The search is carried out up to the first found plugin in all instances
    id: Plugin identifier in one of the host process
    Result: JSON string with description of all public methods and functions in found plugin
  • InvokeGetMember — Find and invoke plugin member without input arguments
    id: Plugin identifier that is loaded in one of the running hosts
    memberName: Member name or property for invoking in specific plugin
    Result: Member invocation result in JSON format or exception
  • InvokeMember — Find an invoke plugin member with input arguments
    id: Plugin identifier that is loaded in one of the running hosts
    memberName: Method or property name that is available as public member in required plugin
    payload: String arguments as JSON payload with arguments list and values
    Result: Member invocation result in JSON format or exception
  • GetInstance — Get a list of all instances that are launched in current machine
    Result: Array of Int32 values of all launched instances
  • GetIpcPlugins — Get a list of all plugins that are launched in specific host
    instance: Host identifier in launched host
    Result: Array of all plugins that are available in loaded host
  • GetIpcPlugin — Get information about one plugin in specific instance.
    instance: Host identifier in launched host
    id: Plugin identifier that is loaded in specified instance
    Result: String in JSON format with description of all public members of specified plugin
  • InvokeIpcGetMember — Invoke plugin member without input arguments
    instance: Host identifier in launched host
    id: Plugin identifier that is loaded in specified instance
    memberName: Method or property name that is available as public member in required plugin
    Result: Member invocation result in JSON format or exception
  • InvokeIpcMember — Internal method available only in IPC communication
  • FindAndInvokeIpcMember — Internal method available only in IPC communication
Теги:

Скачать

Ссылки