Sales
Click for numbers
Welcome User Tools Developer Tools Prices Help Sign up Login
You are here: Home > Developer Tools > Fax Web Service > Samples >  ASP - Simple Fax Transmission

Fax Web Service Code Sample

Simple Fax Transmission from ASP(SendCharFax Method)

Download the ASP project files.

<%
Set objSoap = Server.CreateObject("MSSOAP.SOAPClient30") 'Create the SoapClient object

objSoap.ClientProperty("ServerHTTPRequest") = True 'Set to True when an Active Server Pages (ASP) application or an ISAPI DLL uses the SoapClient object.

objSoap.mssoapinit("http://ws.interfax.net/dfs.asmx?wsdl") 'Initializes the SoapClient object using the Web Services Description Language (WSDL) file as input

SendFaxResult = objSoap.SendCharFax("MyUsername", "MyPassword", "+1 212 4567890", "This is a sample Fax", "txt") ' Invoke the Interfax method

If SendFaxResult > 0 Then

Response.Write "Fax submitted. Transaction ID: " & SendFaxResult
Else
Response.Write "Error sending fax. Return code: " & SendFaxResult
End If
%>



Note: If you are faxing from behind a proxy using MS SOAP v.3, you can use one of the two following options:

Option 1 - Use automatic detection by:
     objSoap.ConnectorProperty("EnableAutoProxy") = True

Option 2 - Specify a proxy server:
     objSoap.ConnectorProperty("ProxyServer") = "192.168.0.100"
and optionally, if the proxy server is password-protected specify:
     objSoap.ConnectorProperty("ProxyUser") = "Proxy Username"
     objSoap.ConnectorProperty("ProxyPassword") = "Proxy Password"




About | Contact | Privacy | Terms | Partners | Login | System Status

© Interfax Inc