[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: FedEx API Using RPG



   got this to work and returns detailed information about the tracking
   number



   added the following tag in red



   <v2:Type>TRACKING_NUMBER_OR_DOORTAG</v2:Type> +

   </v2:PackageIdentifier> +

   <v2:IncludeDetailedScans>1</v2:IncludeDetailedScans> +

   </v2:TrackRequest> +





   Thanks,

   Chris Hayden

   Senior Systems Analyst

   Pilot Corporation of America

   3855 Regent Blvd, Jacksonville, FL 32224

   (904) 645.9999

   Ext. 1252



   -----Original Message-----
   From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   [[1]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Craig
   Jacobsen
   Sent: Thursday, January 22, 2015 7:10 AM
   To: HTTPAPI and FTPAPI Projects
   Subject: Re: FedEx API Using RPG



   Chris,



   We no longer do our own shipping as we were purchased by another
   company and they handle it all.

   I'm pretty sure this works, but it never went live.

   You will have to get your own user credentials from FedEx and replace
   my embedded credentials.



   Hope this helps.



   Craig Jacobsen







   From:                       "Hayden, Chris" <[2]CHayden@xxxxxxxxxxxx>

   To:                           HTTPAPI and FTPAPI Projects
   <[3]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>

   Date:                       01/21/2015 02:10 PM

   Subject:                   FedEx API Using RPG

   Sent by:                   [4]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx









   Craig Jacobsen



   Did you get this webservice call to work and return detailed
   information about the tracking number ?



   Can you send me the code as an .TXT attachment



   Thanks,

   Chris













   We have an internal Fedex server that does the estimated shipping
   charges.



   It uses a FedEx service program called WEBAPICS that they provided.



   However, we do track shipments through FedEx, so maybe that will help.







   // set up the soap request



   Soap='<soapenv:Envelope +




   xmlns:soapenv="[5]http://schemas.xmlsoap.org/soap/envelope/";<[6]http://
   schemas.xmlsoap.org/soap/envelope/%22>; +




   xmlns:v2="[7]http://fedex.com/ws/track/v2";<[8]http://fedex.com/ws/track
   /v2%22>;> +







   <soapenv:Header/> +







   <soapenv:Body> +







     <v2:TrackRequest> +







       <v2:WebAuthenticationDetail> +



        <v2:UserCredential> +



         <v2:Key>xxxxx</v2:Key> +



         <v2:Password>xxxx</v2:Password> +



        </v2:UserCredential> +



       </v2:WebAuthenticationDetail> +







   <v2:ClientDetail> +



     <v2:AccountNumber>123</v2:AccountNumber> +



     <v2:MeterNumber>123</v2:MeterNumber> +



   </v2:ClientDetail> +







   <v2:Version> +



     <v2:ServiceId>trck</v2:ServiceId> +



     <v2:Major>2</v2:Major> +



     <v2:Intermediate>0</v2:Intermediate> +



     <v2:Minor>0</v2:Minor> +



   </v2:Version> +







   <v2:PackageIdentifier> +



     <v2:Value>' + %Trim(TrackNumber) + '</v2:Value> +



     <v2:Type>TRACKING_NUMBER_OR_DOORTAG</v2:Type> +



   </v2:PackageIdentifier> +







   <v2:ShipmentAccountNumber>'+



     FedXCompany +



   </v2:ShipmentAccountNumber>+







   </v2:TrackRequest> +







   </soapenv:Body> +







   </soapenv:Envelope>';







   // post soap service to Fed Ex (ParseXML parses information)



   RC = Http_Url_Post_Xml(
   'https://gateway.fedex.com:443/+<[9]https://gateway.fedex.com/+>



                            web-services'



                         : %Addr(SOAP) + 2



                          : %Len(SOAP)



                          : *NULL



                          : %PAddr(ParseXML)



                          : %Addr(RESP)



                          : HTTP_TIMEOUT



                          : HTTP_USERAGENT



                          : 'text/xml;charset=UTF-8'



                          : '"track"');



   P ParseXML        B







   D ParseXML        PI



   D   Save                          *   Value



   D   Depth                       10I 0 Value



   D   Name                      1024A   Varying Const



   D   Path                     24576A   Varying Const



   D   Value                    32767A   Varying Const



   D   Attrs                         *   Dim(32767)



   D                                     const options(*varsize)







     /Free







      If Name = 'v2:Severity';



       Severity = Value;



      Endif;







     If Name = 'v2:ActualDeliveryTimestamp';



      Delivery = Value;



     Endif;







   /End-Free







   P                 E









   Thanks,

   Chris Hayden

   Senior Systems Analyst

   Pilot Corporation of America

   3855 Regent Blvd, Jacksonville, FL 32224

   (904) 645.9999

   Ext. 1252



   -----------------------------------------------------------------------

   This is the FTPAPI mailing list.  To unsubscribe, please go to:

   [10]http://www.scottklement.com/mailman/listinfo/ftpapi

   -----------------------------------------------------------------------







   Confidentiality Notice: This e-mail message, including any attachments,
   is for the sole use of the intended recipient(s) and may contain
   confidential and privileged information. Any unauthorized review, use,
   disclosure or distribution is prohibited. If you are not the intended
   recipient, please contact the sender by reply e-mail and destroy all
   copies of the original message.  Unless expressly stated in this
   e-mail, nothing in this message or any attachment should be construed
   as a digital or electronic signature.

References

   Visible links
   1. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   2. mailto:CHayden@xxxxxxxxxxxx
   3. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   4. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   5. http://schemas.xmlsoap.org/soap/envelope/
   6. http://schemas.xmlsoap.org/soap/envelope/%22
   7. http://fedex.com/ws/track/v2
   8. http://fedex.com/ws/track/v2%22
   9. https://gateway.fedex.com/+
  10. http://www.scottklement.com/mailman/listinfo/ftpapi

   Hidden links:
  11. file://localhost/tmp/tmpLNqvYo.html
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------