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

Re: First Timer: HTTPS And http_url_post_stmf - Issues



Hi Mike,

400 Bad Request usually means that the URL you are providing is not in a 
valid format for the HTTP protocol.

Looking at your debug, it looks like there's a lot of extra blanks 
(right?) in the URL.  Try trimming them off with %trimr()...

      C                   Eval      Wrk_RetCode = http_url_post_stmf(
      C                             %trimr(UlUrl):
      C                             %trim(UlIFSP):
      C                             %trim(UlIFSR))




Mike Schwartz wrote:
>    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
> -----------------------------------------------------------------------

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