public void CallTrackPackagesByReference()
        {
            TrackingProxy.TrackingService service = CreateTrackingService();

            TrackingProxy.TrackPackagesByReferenceRequestContainer request = new TrackPackagesByReferenceRequestContainer();
            TrackingProxy.TrackPackagesByReferenceResponseContainer response = new TrackPackagesByReferenceResponseContainer();
            request.TrackPackageByReferenceSearchCriteria = new TrackPackageByReferenceSearchCriteria();

            // Setup the request to perform a tracking on a shipment
            request.TrackPackageByReferenceSearchCriteria.Reference = "ref1";
            request.TrackPackageByReferenceSearchCriteria.DestinationPostalCode = "V2S8B7";
            request.TrackPackageByReferenceSearchCriteria.DestinationCountryCode = null;
            request.TrackPackageByReferenceSearchCriteria.BillingAccountNumber = null;
            request.TrackPackageByReferenceSearchCriteria.ShipmentFromDate = null;
            request.TrackPackageByReferenceSearchCriteria.ShipmentToDate = "2009-02-06";

            try
            {
                // Call the service
                response = service.TrackPackagesByReference(request);

                // Display the response
                Display(response.ResponseInformation);
                Display(response.TrackingInformationList);
            }
            catch (Exception ex)
            {
                Console.WriteLine(" EXCEPTION: {0}", ex.Message);
            }
        }
Beispiel #2
0
 /// <remarks/>
 public void TrackPackagesByReferenceAsync(TrackPackagesByReferenceRequestContainer TrackPackagesByReferenceRequest, object userState) {
     if ((this.TrackPackagesByReferenceOperationCompleted == null)) {
         this.TrackPackagesByReferenceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnTrackPackagesByReferenceOperationCompleted);
     }
     this.InvokeAsync("TrackPackagesByReference", new object[] {
                 TrackPackagesByReferenceRequest}, this.TrackPackagesByReferenceOperationCompleted, userState);
 }
Beispiel #3
0
 /// <remarks/>
 public void TrackPackagesByReferenceAsync(TrackPackagesByReferenceRequestContainer TrackPackagesByReferenceRequest) {
     this.TrackPackagesByReferenceAsync(TrackPackagesByReferenceRequest, null);
 }