Announcement

Collapse
No announcement yet.

Libhttp : error on POST method

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Libhttp : error on POST method

    Hi,
    I use Libhttp for Webservice in Saop for few years now. But now i need to try to call a webservice with Post method. every time i try i get an error 404 but with SoapUI i don't have this problem so i don't realy now what is missing me??

    thank you for your help.

    this is example of httplog

    HTTPAPI Ver 1.35 released 2017-05-03
    NTLM Ver 1.4.0 released 2014-12-22
    OS/400 Ver V7R3M0

    http_url_post(): entered
    http_persist_open(): entered
    http_long_ParseURL(): entered
    DNS resolver retrans: 2
    DNS resolver retry : 2
    DNS resolver options: x'00000136'
    DNS default domain: xxx.xxx.xxx
    DNS server found: xxx.xxx.xxx.xxx
    DNS server found: xxx.xxx.xxx.xxx
    DNS server found: xxx.xxx.xxx.xxx
    Nagle's algorithm (TCP_NODELAY) disabled.
    http_persist_post(): entered
    http_persist_req(POST) entered.
    http_long_ParseURL(): entered
    do_oper(POST): entered
    There are 0 cookies in the cache
    POST / HTTP/1.1
    Host: xxx.xxx.xxx.xxx:8085
    SOAPAction:
    Content-Length: 627

    senddoc(): entered
    {"id":211980,"robot":"Robot1","warehouse":"SQ3" ,"a ctivity":"DSG","ref_do":"701734115","year":9,"tota l_packages":60, "comment_l101":" ....
    recvresp(): entered
    HTTP/1.1 404 Not Found
    content-type: application/json
    content-length: 57
    date: Sat, 01 May 2021 09:23:28 GMT
    SetError() 13: HTTP/1.1 404 Not Found
    recvresp(): end with 404
    recvdoc parms: identity 57
    header_load_cookies() entered
    recvdoc(): entered
    SetError() 0:
    recvdoc(): Receiving 57 bytes.
    {"error_code":1000,"error_message":"Rejection(N otF ound)"}
    SetError() 13: HTTP/1.1 404 Not Found
    http_close(): entered
    HTTPAPI Ver 1.35 released 2017-05-03
    NTLM Ver 1.4.0 released 2014-12-22
    OS/400 Ver V7R3M0

  • #2
    Someone - not me - may be able to spot the problem from the log but ... you really need to post your code before we can see what might be wrong.

    Comment


    • #3
      Correction - just noticed that there is a 404 error in there which would suggest that perhaps the URL you are using is incorrect.

      It is also a very old version of HTTPAPI that you are using but I doubt that is the issue.

      Note to Jamie. This bleeping software won't lewt me edit or comment on my own posts now - hence the extra post.

      Comment


      • #4
        Hi,

        I also thought that was a mistake with the url but the same with soapui is alright. my post method was used with webservice in soap but this one is in Rest is it maybe the reason ? or one of the point of the problem maybe

        Comment


        • #5
          In order to tell you why SoapUI works and HTTPAPI does not, we'd need to see what you are doing in both cases.

          Please stop referring to HTTPAPI as "LIBHTTP".

          Comment


          • #6
            I found my solution. as you suspected it the url is false that's why i have got an 404 error. in try with soapui and the same url i have the same problem. when i check with the data provide for the test te url was not the same ...

            thank you for your help !

            Comment

            Working...
            X