ASP.NET Fax - Setting Up Your Environment
To be able to send an ASP.NET fax, the basic concept is to generate an InterFAX 'Proxy' class, which exposes all the methods of the actual InterFAX Web service.
In runtime, the application invokes a method in the proxy class, which in turn converts the request into a SOAP message and sends it to the InterFAX server. When a response returns from InterFAX server, the proxy class converts it into return values received from the method invocation.
If you've already set up your proxy class, continue to the ASP.NET fax examples.
This process enables the application code to consume the InterFAX web service as if it was a local class.
In case of using Visual Studio.NET, this is a button click task. Alternatively, there are certain steps required, as will be described in this section.
The InterFAX web service offers three services:
- Sending faxes
- Receiving faxes
- Account administration
These services are available at three different URLs. Each service has its own WSDL (Web Service Definition Language). The WSDL is a formal description of a web service and is used for generating the proxy class.
All services can use http or https (for secure connection). The WSDL of each service can be reached by adding "?WSDL" to the service URL.
|Outbound service (sending faxes)||ws.interfax.net/dfs.asmx|
|Inbound service (receiving faxes)||ws.interfax.net/inbound.asmx|
|Administration services (administrating accounts)||ws.interfax.net/admin.asmx|
ASP.NET Fax - Using InterFAX Web Service from Visual Studio.NET
In your project, click References > Add web reference, and type the required URL, according to the desired ASP.NET fax service you'd like to consume.
Within the ASP.NET fax code, make a reference to the class generated by this operation.
ASP.NET Fax - Using InterFAX Web Service without Visual Studio.NET
In order to use the Web service to send faxes using ASP, without Visual Studio, the Microsoft .NET Framework SDK is required. It is free software from Microsoft, and can be downloaded off Microsoft's site:
- Create a proxy class source file (.vb or .cs).
- Compile the source code file into a .NET assembly (.dll) and place the DLL in your \bin folder.
- Reference the class within your ASP.NET script.
All work should be done in a folder named c:\temp\Interfax\.