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

Re: First Timer: HTTPS And http_url_post_stmf - Issues



   Hello Everyone,



   Just a quick update on a change I tried late last night.  I made a
   very simple change to the below piece of code, which seems to have
   made somewhat of a difference.  I added the "%trim()" to the UlUrl
   value.  This value is a string pulled from a file via a CHAIN
   operation.  Once I put this change in, I am no longer receiving the
   "400 - Bad Request" error.  Now I am receiving "417 - Expectation
   Failed".  Speaking with the customer I am working with, they feel the
   issue has to do with the "Expect:  100-continue" line.  They would
   like me to remove it and test again.  Is there any way at all to
   remove this line, other than physically removing it from the code in
   HTTPAPIR4?  I really do not want to go that route, as I am not sure if
   there are any legacy processes on our system that may be using this.



   Thanks,

   Mike



   Code that was changed in my program that was attached to last e-mail:

    *
    *** Post the web service request to the web site using a procedure
    *** from HTTPAPI.
   C                   Eval      Wrk_RetCode = http_url_post_stmf(
   C                             %trim(UlUrl):
   C                             %trim(UlIFSP):
   C                             %trim(UlIFSR))
   ----- Original Message -----
   From: Mike Schwartz <mike.schwartz@xxxxxxxxxxxxx>
   Date: Wednesday, April 15, 2009 14:49
   Subject: First Timer: HTTPS And http_url_post_stmf - Issues
   To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx

   Hello Everyone,



   First, I want to say what a fantastic resource I have found this site
   to be.  I am an ooollldd S/36, S/38, AS/400 green screener, so when I
   had a project handed to me that involved Web Services, I definitely
   had the deer in the headlights look on my face.



   It turned out that the HTTPAPI libraries had been loaded on our
   AS/400, but were not being utilized, so there was really no one here
   that could offer me a lot of help.  I have picked up quite a bit
   reading through these lists, but due to my lack of knowledge, I am
   still having issues.



   I am trying to consume web services through a service utilizing
   RESTful architecture.  I am building an XML file, formatted through
   Inovis TrustedLink, and placed on the IFS.  To execute a POST
   operation, I am utilizing the HTTP_URL_POST_STMF() API.  The site I am
   connecting to is an HTTPS, and they specify they are utilizing SSL,
   which can also be seen as their certificate info is present in the
   HTTP Debug file.  I have imported their certificate into DCM and
   believe I have it correctly setup and linked to my program.



   When the program is run, it connects to their site, but I am
   continually getting a "400 - Bad Request" error message in reply.
   However, if I download the XML file from the IFS, and send it as an
   e-mail attachment to the client, they are able to easily load it into
   their system with no issues.



   So, I am hoping someone can review the attached documents which
   include my program, debug file, response file, and upload file, and
   hopefully provide me some assistance.  I have removed any "private"
   data from the debug file to "protect the innocent".



   Looking forward to hearing from everyone.



   Thanks in advance for your help.



   Mike Schwartz

   Cengage Learning

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