Sales
Click for numbers
Welcome User Tools Developer Tools Prices Help Sign up Login
You are here: Home > Developer Tools > Fax Web Service > Samples > Java - How to retrieve the status of a fax

Fax Web Service Code Sample

Java - How to retrieve the status of a fax

Download the Java project files.

class StatusTest {
public static void main(String[] args) throws Exception {

try {
// Create an instance of the Web Service Object
InterFaxSoapStub ifs = new InterFaxSoapStub(new URL("http://ws.interfax.net/DFS.asmx"), new Service(new QName("FaxStatusEx")));
int totalCount, listSize, ret;
totalCount = 0;
listSize = 0;
ret = 0;
IntHolder ih1 = new IntHolder(totalCount);
IntHolder ih2 = new IntHolder(listSize);
IntHolder ih3 = new IntHolder(ret);

//Get Status
ArrayOfFaxItemEx aofie = ifs.faxStatusEx("MyUsername","MyPassword",TransactionID,10,ih1,ih2,ih3);

FaxItemEx[] fieArr = aofie.getFaxItemEx();
for (int i=0;i<10;i++) {
System.out.println("TransactionID: " + aofie.getFaxItemEx(i).getTransactionID());
System.out.println("Destination: " + aofie.getFaxItemEx(i).getDestinationFax());
System.out.println("Status: " + aofie.getFaxItemEx(i).getStatus());
System.out.println("===============================");
}
} catch(Exception e) {
System.out.println(e.toString());
}
}
}



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

© Interfax Inc