This release is a downloadable binary install file in either a .zip or .tar.gz format. Once extracted the release will expand into a directory easylink_soa_java_sendfax-1_0. This install contains the following directories
/apps – Contains the required Apache Axis-1_4 installation and jars
/bin – Contains runtime scripts to run the standard fax functions
/data – Sample data for faxing
/docs – Documentation and JavaDocs
/lib – Contains the pre-built jars for the SendFax application
/src – The source code for the samples and ELSFaxManager object
/wsdl – The web service description language files for the SendFax service
You will first need to validate that you have a Java runtime installed. Please do this by typing “java -version” at the command prompt. You should see text that says Java™ 2 Runtime Environment, Standard Edition (built 1.5.0_02) or similar. You must have at least a Java 1.4 or better runtime installed. If you do not have this please visit http://java.sun.com/javase/downloads/index.jsp
and install the Java SE Development Kit.· SendFax – Send a fax through the easylink. Network
· ResendFax – Resend a fax already sent with SendFax
· KillFax – Terminate a fax that is waiting to be sent
· QueryFax – Query the Status of a fax on the Easylink Network



The source code for the sample applications are contained in the src/com/easylink/services/sample package. There are java files in this package for each of the sample applications.
The sample applications are wrappers for the ELSFaxManager object. These samples take the command line parameters and pass them into the ELSFaxManager and invoke the appropriate call. You can look at the source code for these samples as an example of how to instantiate and invoke the ELSFaxManager object.
SendFax is a Web Service that is available on the Internet for sending faxes from your application. To make it easier to use Easylink has packaged up the capabilities of the web service in a manager, ELSFaxManager.java. The source code for this manager can be viewed in src/com/easylink/services/ELSFaxManager.java.
Using ELSFaxManager is very simple. All that is needed is to instantiate an instance of ELSFaxManager, set the host, port, registered email address and password then invoke the appropriate method call.

Underneath the covers ELSFaxManager uses the Apache Axis 1.2 framework to instantiate a service, make the service call and return the results of the service.
The installation contains all of the services and types already created for the SendFax web-service using the Apache Axis wsdl2java call. These services can be located in src/com/easylink/webtools/services/SendFaxManager under the packages Description, Service and Types.
Of primary interest to you as a developer are the Types package and the SendFaxResponse, QueryFaxResponse, KillFaxResponse, and ResendFaxResponse objects.
When connecting the SendFax service you must use the appropriate host and port. The Easylink service supports the following connections:
webservicetest.easylink.com:443 - Test system secured fax endpoint
faxadmin.easylink.com:443 - Secured production fax endpoint
ELSFaxManager.sendFax(…) requires at least one file attachment as the content to be faxed. These attachments can be any file type supported by the Easylink network. Please refer to FAQ for the supported types.
In a production environment Easylink requires that you connect to a secured endpoint. This means that you will need to set your port to 443 and activate the secured flag on the ELSFaxManager object. You do this by calling setSecured(true).
However to make a secured connection you must have a proper certificate installed into a keystore. You then have to inform the ELSFaxManager where the keystore is.

To setup your environment for running over a secured connection follow these steps:
1. Create a keystore using the java keytool
a.
Change to the easylink_soa_java_sendfax-1_0/bin
directory and type
keytool -import -file ..\wsdl\webservicestest.easylink.com.crt -keystore
.\mykeystore.keystore -alias
webservicestest.easylink.com
b. Enter
a password for the keystore and type yes at the prompt to trust this
certificate
Note:
if keytool is not found then you might not have the
proper Java Development Kit installed and accessible in your environment.
2. Pass
the keystore to the ELSFaxManager by using the setKeyStore(String) method
and setSecured(true) to tell the ELSFaxManager to use an https
connection. Also make sure to set the
port to the secured inbound port, 443.
If you are using the sample
applications (SendFax, KillFax,
QueryFax, ResendFax) you
need to add the –s option with the location of your keystore
where you imported the certificate. For
example:
SendFax -hwebservicestest.easylink.com –p443
-emytest@acme.com –Ppassword0 -d15557415335 –u12121212
-fc:\\dev\\easylink_soa_sendfax-1_0\\data\\EasyLinkSendFaxTest.doc –s./easysendfax.keystore
The ELSFaxManager is built on top of the Axis 1.4 framework and the standard Easylink SendFax web service. The WSDL and XSD descriptions of the service can be found in the /wsdl folder.
If you would like you can compile the Axis 1.2 locater and service yourself. To do so a script has been provided in the /bin folder.
To compile all of the services and types, enter the following at the command prompt
wsdl2java ..\wsdl\SendFaxManagementService.wsdl -o ..\src --all -w
This will create the package com.easylink.webtools.services.SendFaxManagement.
Within this package are the Description, Services and Types packages.
Service contains the SendFaxManagerLocater and Service
Description contains the SendFaxManagerPortType and SoapBindingStub
Types contains the Request, Response and data containers
An ANT build script has been provided in the root folder to help compile the package and create the jar.
To compile make sure that you have Ant 1.6 or better installed on your machine and the ANT_HOME environment variable properly set.
Test by typing ant at the command prompt.
Edit the easylink_soa_sendfax-1_0.properties file and set the attributes for ant_home and jdk.home.jdk_1.5.
From the root (where build.xml resides) run