Send a fax¶
FaxServiceProxy.SendFax wraps the Fax SOAP service (FaxServiceSoapClient) to send a file, identified only by its local path, to a fax recipient over a Windows-authenticated transport.
| Field | Value |
|---|---|
| Operation ID | OP-WP-03 |
| Trigger | Services/SAIF.Services.WCF/Services/FaxService.cs:42 (non-eligible in this run), or package consumers |
| Inputs | FaxRecipient message, string fullFilePath |
| Outputs | None; the call is fire-and-forget |
| Primary components | FaxServiceProxy.SendFax |
| Entry point | Services/SAIF.Services.Web.Proxies/FaxServiceProxy.cs |
Steps¶
- Construct
FaxServiceProxy(serviceUrl): guardserviceUrl(WP-BR-001), then buildBasicHttpBinding(TransportCredentialOnly)withHttpClientCredentialType.Windowsandint.MaxValuequotas (WP-BR-010). SendFax(message, fullFilePath):- Build a wire
FaxInfowithAttachment = fullFilePath(a file path, not file content),ToFaxNumber = message.FaxNumber, andToName = message.RecipientName.- On failure: there is no null guard on
message; CA1062 is suppressed, so a nullmessagethrowsNullReferenceException.
- On failure: there is no null guard on
- Call wire
Send(faxInfo). Nothing is returned; the operation is fire-and-forget.
Process flow¶
The following diagram visualizes the fax send path.
flowchart TD
Start([SendFax invoked]) --> Guard{"message not null?"}
Guard -->|No| Fail([NullReferenceException])
Guard -->|Yes| Build["Build wire FaxInfo<br>(Attachment = file path)"]
Build --> Send["Call wire Send(faxInfo)"]
Send --> Ret(["Return; no result"])
Failure and edge-case behavior¶
- A null/empty
serviceUrlat construction throws an argument exception before any wire client is created. - A null
messagethrowsNullReferenceException, because the caller-supplied argument is not guarded (CA1062 suppressed). - The remote fax service receives only a file path; the file's existence and readability at send time are the remote service's responsibility, not this wrapper's.
Related documentation¶
Sources¶
Services/SAIF.Services.Web.Proxies/FaxServiceProxy.cs