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

RE: FedEx API Using RPG



I will at about 15H45 I hope....  Its Jadie-Naidie day apparently so she doesn't mind - just have to beat the storm that's on its way... Getting really dark out there....

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Craig Jacobsen
Sent: 22 January 2015 02:10 PM
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" <CHayden@xxxxxxxxxxxx>
To:                           HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Date:                       01/21/2015 02:10 PM
Subject:                   FedEx API Using RPG
Sent by:                   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="http://schemas.xmlsoap.org/soap/envelope/";<http://schemas.xmlsoap.org/soap/envelope/%22>; +

        xmlns:v2="http://fedex.com/ws/track/v2";<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/+<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:
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.

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------