UPS XML Integration on Ecommerce Site - Forum - Community Groups - Progress Community

UPS XML Integration on Ecommerce Site

 Forum

UPS XML Integration on Ecommerce Site

  • I am currently working on a project to integrate our ecommerce site with UPS to get shipping charges.  I am having difficulty communicating with their on-line tools and was wondering if anyone has successfully done this.  We are on Progress 9.1B client and Webspeed 3.1E.  We are using UPS's xml facility to request and receive delivery information.  I can create the xml files and I've tried a number of different ways to connect using sockets, but just can't seem to get the connection right.  UPS expects 2 xml files when a request is made, one right after the other.  The 1st xml file defines our access and the 2nd is the actual request for information.  I'm wondering if maybe sending the 2 one after another is the problem or if the way I'm connecting and waiting to receive feedback is the issue?  I've tried a number of ways, without any luck.  I've used the technique described in the "Post a HTTP request using 4gl" article here, as well as the event-driven and procedural models discussed in the Sockets section of the EPI manual for Version 9.  I am attaching my latest version which seems to connect up to a point, but returns a "Connection failure for host xxx port 443 transport tcp (9407)".  In this version, I have commented out the 2nd write I need to do which is the UPS request XML file.  I get the same 9407 error message when it is uncommented out.

    This is my first time working with Sockets and xml.  Thanks in advance for any information!

    Susan

    test-ups-conn4.p

    crt-rate-req3-post.p

  • Could it be the firewall causing the problem. As I think you can not define the range of ports used for 4GL socket object.

  • The port we are using is 443 which is the HTTPS port and is open on the firewall.  Thanks for your feedback.

  • Your code does not appear to be using the -ssl option on the connection.

    as such:

    DEF VAR vcHost AS CHAR INITIAL "www.ups.com" NO-UNDO.
    DEF VAR vcPort AS CHAR INITIAL "443" NO-UNDO.
    DEF VAR vhSocket AS HANDLE NO-UNDO.

    CREATE SOCKET vhSocket.
    vhSocket:CONNECT(' -H ' + vcHost + ' -S ' + vcPort + " -ssl").

    IF vhSocket:CONNECTED() = FALSE THEN
    DO :
        MESSAGE "UPS connection failed" VIEW-AS ALERT-BOX.
        MESSAGE ERROR-STATUS:GET-MESSAGE(1) VIEW-AS ALERT-BOX.
        RETURN.
    END.
    ELSE DO:
        MESSAGE "Connected" VIEW-AS ALERT-BOX.

         vhSocket:Disconnect().

    END.

  • Unfortunately I don't believe the -SSL parameter exists with our version of Progress (9.1B).  Unfortunately, the response I received from Progress was that they do not support SSL on Progress version 9.  It didn't start until version 10.0B.  They referred me to some 3rd party solutions which we are investigating now.

    Thank you for your feedback.

  • Hello sfaucett

    I am looking for a sample code for transmitting the XML data to UPS with OpenEdge.

    It would be great if willing to post your code?