Example 78 : Find consignment all statuses

Printer-friendly version

 This example shows you how to find all of the possible consignment statuses.

package com.metapack.dm.test;
 
import com.metapack.deliverymanager.client.webservices.InformationService;
 
public class Example78 extends ExampleBase {
 
	public void run() throws Exception {
 
		InformationService service = createInformationService(); 
		String[] consignmentStatuses = service.findConsignmentStatuses();
		if( consignmentStatuses == null ) {
			System.out.println( "Consignment statuses not found" );
		} else {
			for (int i=0; i<consignmentStatuses.length; i++) {
				System.out.println( "Consignment Status : " + consignmentStatuses[i] ) ; 					
			}
		}
	}
 
	public static void main(String[] args ){
		Example78 ex = new Example78();
		try {
			ex.run();
		} catch( Exception e ) {
			e.printStackTrace();
		}
	}
}