Class MM7Client
Allows you to submit MMS messages
public class MM7Client : IDisposable
- Inheritance
-
MM7Client
- Implements
Constructors
MM7Client(string)
public MM7Client(string remoteUrl)
Parameters
remoteUrl
string
Fields
Logger
public ILog Logger
Field Value
Properties
AuthId
Gets or sets the authentication id used for authentication on the remote MMS Relay/Server
public string AuthId { get; set; }
Property Value
AuthScheme
Gets or sets authentication scheme used by the remote side. Can be 'Basic' and 'Digest'
public AuthenticationSchemes AuthScheme { get; set; }
Property Value
AuthSecret
Gets or sets the authentication secret (password) used for authentication on the remote MMS Relay/Server
public string AuthSecret { get; set; }
Property Value
MM7Version
Gets or sets the version of MM7 requests
public string MM7Version { get; set; }
Property Value
Proxy
Gets or sets the proxy for HTTP request.
public IWebProxy Proxy { get; set; }
Property Value
RemoteUrl
Gets or sets Url of the remote MMS Relay/Server
public string RemoteUrl { get; set; }
Property Value
SenderAddress
The address of the MM originator.
public string SenderAddress { get; set; }
Property Value
ServiceCode
Information supplied for billing purposes
public string ServiceCode { get; set; }
Property Value
SoapAction
Get or sets SOAPAction HTTP header, that will be sent to server
public string SoapAction { get; set; }
Property Value
Timeout
Gets or sets the length of time before the request times out.
public int Timeout { get; set; }
Property Value
VASID
Identifier of the originating application.
public string VASID { get; set; }
Property Value
VASPID
Identifier of the VASP for this MMS Relay/Server.
public string VASPID { get; set; }
Property Value
Methods
CreateDeliverRequest()
Creates DeliverRequest for current MM7 client. Copies base parameters from client to request.
public DeliverRequest CreateDeliverRequest()
Returns
CreateDeliveryReport()
Creates DeliveryReportRequest for current MM7 client. Copies base parameters from client to request.
[Obfuscation(Exclude = true, StripAfterObfuscation = true)]
public DeliveryReportRequest CreateDeliveryReport()
Returns
CreateReadReplyReport()
Creates ReadReplyReportRequest for current MM7 client. Copies base parameters from client to request.
public ReadReplyReportRequest CreateReadReplyReport()
Returns
CreateSubmitRequest()
Creates SubmitRequest for current MM7 client. Copies base parameters from client to request.
public SubmitRequest CreateSubmitRequest()
Returns
Deliver(MMSMessage, DeliverRequest, CancellationToken)
Submits MMS Message to VASP when server operates as MMSC, using custom DeliverRequest
public Task<DeliverResponse> Deliver(MMSMessage message, DeliverRequest req, CancellationToken token = default)
Parameters
message
MMSMessagereq
DeliverRequesttoken
CancellationToken
Returns
Deliver(MMSMessage, CancellationToken)
Submits MMS Message to VASP when server operates as MMSC
public Task<DeliverResponse> Deliver(MMSMessage message, CancellationToken token = default)
Parameters
message
MMSMessagetoken
CancellationToken
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetWebRequest(Uri)
Creates HttpWebRequest for the specified url
protected virtual HttpRequestMessage GetWebRequest(Uri url)
Parameters
url
UriUri to use when creating the HttpWebRequest
Returns
- HttpRequestMessage
The web request for the specified URI.
Remarks
This method can be overridden to customize the WebRequest before the MMS Web service request is made. For example, you could add a custom header to the request.
Exceptions
- AuthenticationException
Thrown when an Authentication error when unsupported AuthenticationSchemes is used.
GetWebResponse(HttpRequestMessage, CancellationToken)
Returns a response from a request to an MMS Web service message.
protected virtual Task<HttpResponseMessage> GetWebResponse(HttpRequestMessage request, CancellationToken token)
Parameters
request
HttpRequestMessageThe HttpWebRequest from which to get the response.
token
CancellationToken
Returns
- Task<HttpResponseMessage>
A response from a request to an MMS Web service message.
SendDeliveryReport(DeliveryReportRequest, CancellationToken)
Submits Delivery Report Message to VASP when server operates as MMSC
public Task<DeliveryReportResponse> SendDeliveryReport(DeliveryReportRequest req, CancellationToken token = default)
Parameters
req
DeliveryReportRequesttoken
CancellationToken
Returns
SendReadReplyReport(ReadReplyReportRequest, CancellationToken)
Submits Read-Reply Report Message to VASP when server operates as MMSC.
public Task<ReadReplyReportResponse> SendReadReplyReport(ReadReplyReportRequest req, CancellationToken token = default)
Parameters
req
ReadReplyReportRequesttoken
CancellationToken
Returns
Submit(MMSMessage, ChargedParty, CancellationToken)
Submits MMS Message to MMSC with specified ChargedParty
public Task<SubmitResponse> Submit(MMSMessage message, ChargedParty chargedParty, CancellationToken token = default)
Parameters
message
MMSMessagechargedParty
ChargedPartytoken
CancellationToken
Returns
Submit(MMSMessage, SubmitRequest, CancellationToken)
Submits MMS Message to MMSC with custom SubmitRequest
public Task<SubmitResponse> Submit(MMSMessage message, SubmitRequest req, CancellationToken token = default)
Parameters
message
MMSMessagereq
SubmitRequesttoken
CancellationToken
Returns
Submit(MMSMessage, CancellationToken)
Submits MMS Message to MMSC with ChargedParty.Sender
public Task<SubmitResponse> Submit(MMSMessage message, CancellationToken token = default)
Parameters
message
MMSMessagetoken
CancellationToken
Returns
Submit(string, SubmitRequest, CancellationToken)
Submits SMIL file with attachments as MMS message.
[Obfuscation(Exclude = true, StripAfterObfuscation = true)]
public Task<SubmitResponse> Submit(string smilFilePath, SubmitRequest req, CancellationToken token = default)
Parameters
smilFilePath
stringreq
SubmitRequesttoken
CancellationToken