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

Debug file error 400 using HTTPAPI





   Worth Holmes

   Extn 1656

   (817) 938-3889


   From: Holmes, Worth
   Attached is the debug file showing the log.  It still does not show
   the actual HTTP sent to the url.


   I don't know how to determine the error.


   HTTP/1.1 400 Bad request


   The specification for the URL is as follows:

   3 Protocol

   This system uses the standard HTTP POST protocol:

   (1) Open TCP/IP connection to VHR server.

   (2) Send request formatted as an HTTP POST (RFC 2616, see
   [1]http://www.faqs.org/rfcs/rfc2616.html).

    

   3.1.1 Request Format

   The following fields are part of the request, and all are mandatory:

   Field Id             Field Type         Notes

   id                     Character          User id, assigned by
   Experian. Currently, user ids are numeric.

   password          Character          Password, assigned by Experian.
   This field is case-sensitive.

   level                 Character          The values allowed are:
   "full".

   vinlist                Character          A list of VINs,
   comma-separated; VINs are converted to upper-case and truncated at 17
   characters


   I received this after executing the following within an RPG program:
   (rc was 400)


   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;


   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.

References

   1. http://www.faqs.org/rfcs/rfc2616.html
HTTPAPI Ver 1.23 released 2008-04-24
OS/400 Ver V6R1M0

New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 1
DNS resolver retry  : 2
DNS resolver options: x'00000136'
DNS default domain: UNITRININC.COM
DNS server found: 10.200.128.83
DNS server found: 10.200.128.84
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /ais/servlets/VHRXML HTTP/1.1
Host: www.experian.com
User-Agent: http-api/1.23
Content-Type: text/xml
Expect: 100-continue
Content-Length: 75


recvresp(): entered
SetError() #43: CommTCP_read: No 100-Continue (error ignored)
senddoc(): entered
id=########++&password=pppppppppp+++&level=full&vinlist=1D7HA18N18J142004
recvresp(): entered
HTTP/1.1 100 Continue


SetError() #13: HTTP/1.1 100 Continue
HTTP/1.1 400 Bad request
Server: Sun-Java-System-Web-Server/7.0
Date: Wed, 01 Jun 2011 19:10:08 GMT
Content-length: 26
Content-type: text/html
X-Powered-By: Servlet/2.5 JSP/2.1


SetError() #13: HTTP/1.1 400 Bad request
recvdoc parms: identity 26
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
Required parameter missing
SetError() #13: HTTP/1.1 400 Bad request
http_close(): entered
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------