Main Content

MWHttpClient

About MWHttpClient

Implements MWClient interface.

Establishes HTTP-based connection between MATLAB® Production Server™ client and server. The client and server can be hosted on the same machine, or different machines with different platforms.

MWHttpClient allows the client to invoke MATLAB functions exported by a generic deployable archive hosted by the server. The deployable archive is made available to the client as a URL.

A server can host multiple deployable archives since each deployable archive has a unique URL.

In order to establish client-server communication, the following is required:

  • URL to the deployable archive in the form: http://localhost:port_number/archive_name_without_extension

  • Names of MATLAB functions exported by the deployable archive

  • Information about the number of inputs and outputs for each MATLAB function and their types

  • A user-written interface including:

    • Public methods with same names matching those of the MATLAB functions exported by the deployable archive. Methods must be consistent with MATLAB functions in terms of the numbers of inputs and outputs and their types

    • Each method in this interface should declare the exceptions:

      • Mathworks.MPS.Client.MATLABException — Represents MATLAB errors

      • System.Net.WebException — Represents any transport errors during client-server communication

    • There can be overloads of a method in the interface, depending on the MATLAB function that the method is representing

    • Interface name does not have to match the deployable archive name

Members

Constructor

 public class MWHttpClient : MWClient

Creates an instance of MWHttpClient

Public Instance Methods

 CreateProxy

 Close

Requirements

Namespace

com.mathworks.mps.client

Assembly

MathWorks.MATLAB.ProductionServer.Client.dll

See Also

MWClient