Java – How to retrieve the status of a fax
Note that this is a deprecated sample. Please review the Java fax code samples section for newer samples.
Note that this is a deprecated sample. Please review the Java fax code samples section for newer samples.
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("https://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());
}
}
}