Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FedEx xml or not ?
Message
De
07/03/2003 15:26:10
 
 
À
07/03/2003 08:27:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00760667
Message ID:
00762971
Vues:
25
>Again, Leland gets the credit for this sample code and instructions. The program returns the delivery status of a FedEx shipment. You must have a valid FedEx tracking number to test/use it.

Thanks Dale


>The UPS system provides much more information (detail) than the FedEx system. Hopefully it won't be too long for FedEx to "catch up".
>
>The way I use it is:
>
>My program collects all shipment info. from in-house UPS and FedEx computers every night and places it in a shipping detail table that's related to a customer table. If a customer calls wanting shipment status, all the Customer Service Rep has to do is click a button and two seconds later an up to date status pops up. Pretty neat!
>
>Go to http://www.xmethods.com/
>
>Once the page loads you can click on a (FedEx Tracker) provider and a page will appear that has the information needed to register the service in VFP. The example I'm using here is the (FedEx Tracker) web service so you should click on it. When its page appear in your browser print it or capture the WDSL ULR Location info to your clipboard.
>
>Go to VFP and in the main menu:
>
>Tool --> IntelliSence Manager
>
>After clicking on IntelliSence Manager a form appears. Click on [Types] page frame and then on the Web Services Button. Pick any name (I used fetex for the sample below) for the Web Service that will be used in VFP. Then enter the WSDL URL Location from the page printed above or from the clipboard. After some time VFP should indicate that the service has been registered.
>
>Then open a program called test or whatever with the following command:
>
>Modify command test.prg
>
>Here is the sample code:
>
>
>LOCAL cc_ver as fetex	
>LOCAL loWS
>loWS = NEWOBJECT("Wsclient",HOME()+"ffc\_webservices.vcx")
>loWS.cWSName = "fetex"
>cc_ver = loWS.SetupClient("http://www.xmethods.net/sd/2001/FedExTrackerService.wsdl", "FedExTrackerService", "FedExTrackerPort")
>
>trk_no=space(18)
>DEFINE WINDOW comment FROM 3,3 TO 17,175 ;
>font 'courier',12 STYLE 'N';
>NOCLOSE NOFLOAT NOGROW SHADOW NOZOOM DOUBLE color scheme 10
>ACTIVATE WINDOW comment
>do while .T.
>clear
>@ 1,2 say "Enter the Tracking Number" get trk_no
>read
>lee=cc_ver.getStatus(alltrim(trk_no))
>@ 3,2 say " Tracking No. Status is: "
>modify window comment font 'courier',10 STYLE 'BI'
>@ 2.4,15 say lee
>modify window comment font 'courier',12 STYLE 'N'
>@ 8.5,2 say "Exit Tracking Number?"
>
>DEFINE MENU getans font 'ms sans serif',10 style 'NI' color scheme 13
>DEFINE PAD yes of getans PROMPT ' \<Yes ' AT 8.8,40
>DEFINE PAD no of getans PROMPT ' \<No ' AT 8.8,50
>on SELECTION PAD yes of getans Deactivate MENU getans
>on SELECTION PAD no of getans Deactivate MENU getans
>Activate MENU getans
>Release MENU getans
>IF prompt() = ' Yes '
>exit
>else
>trk_no=space(18)
>endif
>enddo
>release window comment
>return
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform