Example 62 : Debugging allocations with booking code
This example shows how to see why a particular service was not selected using a booking code.
package com.metapack.dm.test; import com.metapack.deliverymanager.client.Consignment; import com.metapack.deliverymanager.client.webservices.DebugService; public class Example62 extends ExampleBase { public void run() throws Exception { DebugService service = createDebugService(); Consignment consignment = createDefaultConsignment( "EXAMPLE-62" , 1 ); String bookingCode = "!PLDPD,!DHLPRE1200/*/*-*/2011-03-01/*-23:59"; String[] messages = service.debugWhyNotWithBookingCode( consignment , bookingCode ); for( String message : messages ) { System.out.println( message ); } } public static void main(String[] args ){ Example62 ex = new Example62(); try { ex.run(); } catch( Exception e ) { e.printStackTrace(); } } }

