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

HTTPAPI - A path name is too long



   Has anyone received this message "open(): A path name is too long."
   When trying to perform a post that will result in receiving an XML
   file?


   The full file name is "/qdls/Temp/VIN229453.xml".


   Also, what is the best way to display the HTTP that is generated? I
   had the program in debug and verified all variables, and received the
   message at statement 135.  RC was -1.


   Below is the source that is executed prior to receiving the message (
   I used EXAMPLE2, which I had successfully compiled & executed,  as a
   starting point):

   0094.00  /free

   0095.00

   0096.00    //  Get the userid & password using input state & LOB
   -----

   0097.00    Chain (State : LOB)
   UNCVDACCT;

   0098.00    If
   %Found;

   0099.00       UserID =
   EXPACT;

   0100.00       Password =
   EXPPWD;

   0101.00
   endif;

   0102.00

   0103.00    // Post the request using input VIN, user, pwd
   ------------

   0104.00

   0105.00    Form =
   WEBFORM_open;

   0106.00

   0107.00    callp WEBFORM_SetVar(Form: 'id':
   UserID);

   0108.00    callp WEBFORM_SetVar(Form: 'password':
   Password);

   0109.00    callp WEBFORM_SetVar(Form: 'vinlist':
   VIN);

   0110.00    callp WEBFORM_SetVar(Form: 'level':
   'full');

   0111.00

   0112.00    // The WEBFORM_postData() routine retrieves data suitable
   for

   0113.00    // the http_url_post()
   API.

   0114.00

   0115.00    callp WEBFORM_postData(Form: myPointer:
   dataSize);

   0116.00

   0117.00    //  The http_url_post() function does an HTTP POST
   operation

   0118.00    //  sending any data at the pointer you
   specify.

   0119.00

   0120.00    //  The results, in this case, are saved to the IFS in
   Filename

   0121.00    //  like '/qdls/Temp/VIN123456.xml' which is last 6 char of
   vin.

   0122.00

   0123.00    Filename = '/qdls/Temp/VIN' + %subst(vin:12:6) +
   '.xml';

   0124.00

   0125.00    rc =
   http_url_post('http://www.experian.com/ais/servlets/VHRXML'

   0126.00                        :
   myPointer

   0127.00                        :
   dataSize

   0128.00                        :
   Filename

   0129.00                        :
   HTTP_TIMEOUT);

   0130.00

   0131.00      if rc =
   302;

   0132.00         rc = http_url_get(http_redir_loc  :
   Filename);

   0133.00      endif;

   0134.00

   0135.00      if rc <>
   1;

   0136.00         msg =
   http_error;

   0137.00         dsply
   msg;

   0138.00
   else;

   0139.00         exsr
   Parse_XML;

   0140.00      endif;

   0141.00

   0142.00    // When done, make sure you call this function to free up
   memory

   0143.00      callp WEBFORM_close(Form);

   0144.00

   0145.00      *inlr =
   *on;


   The Parse_XML subroutine parses the XML document using the slick
   operand XML-INTO.


   Worth Holmes | Sr. Programmer / Analyst |  UNITRIN SPECIALTY
   8360 LBJ Freeway Suite 400 | Dallas, TX 75243 | (: 800-456-1919
   ext. 1656 | *: wholmes1@xxxxxxxxxxx |


   CONFIDENTIALITY NOTICE: This communication may contain confidential
   information intended only for the addressee(s). If you received this
   communication in error, please notify the sender and delete it from
   your system.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------