ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Error received calling Ws with HTTAPI

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

  • Error received calling Ws with HTTAPI


    I all i'm try to consume a Web services with Scott Klement HTTAPI, the Web service return "HTTP/1.1 500 Internal Server Error" . Attached see httpapi_debug.txt and http_result.txt content
    which could be the problem ?

    in the main time, as at the moment i'm not able to try with SOAPUI ( in need certificate in my Pc) ; i tried to post an Xml file (from iseries) that the Server Web Service Admin sent to me and that he said that it is good , but also with this i get the same error, so i suppose that a char coding problem ?
    i checked :
    1- CCIDS id Xml file stored in ifs : 1208 (Ok ?)
    2- First row of my Xml file stored in ifs :<?xml version="1.0" encoding="utf-8"?> (Ok ?)
    this is the call to the procedure :

    Code:
    ContentType = 'text/xml; charset=utf-8';
    rc = http_url_post_stmf(%Trim(NomeWS_par) :
    %Trim(tempFile) :
    '/tmp/http_result.txt' :
    HTTP_TIMEOUT :
    HTTP_USERAGENT :
    ContentType );
    Pheraphs i have to use HTTP_URL_POST_STMF_XML ?
    any other suggestion ?

    Thanks in advance
    Attached Files
    Last edited by patrik; June 25, 2016, 04:52 PM.

  • #2
    Hi any suggestions ?

    a doubt ? is normal that in the log i dont see "
    New iconv() objects set,........" Thanks

    Comment


    • #3
      The web service is sending you this error message:

      Code:
      <env:Fault>                                                          
        <faultcode>env:Server</faultcode>
        <faultstring>[invalid field] [invalid field]</faultstring>
        <detail fault:type="faultDetails" xmlns:fault="http://www.vordel.com/soapfaults"></detail>
      </env:Fault>

      Comment


      • #4
        Hi Scott
        Ok .. but what do you think could be the problem ? can you suggest me some check to do ?
        I noted that my Xml have CRLF for new line and instead example supplied from the Web Service admin had olny LF (Line feed) .. possible this give this problem
        thanks in advance

        Comment


        • #5
          If the web service works from SoapUI, I would say that either your SoapAction or XML document does not match what SoapUI is sending.

          If the web service doesn't work from SoapUI then I would contact whomever provides it and ask what that Soap Fault means, and what you need to do differently to make it work.

          The difference between CRLF and LF doesn't usually matter in XML.

          Comment


          • #6
            Hi Scott
            found the problem !!! it was the SOAPAction parameter that was not correct ..
            thanks anyway for your suggestions

            Comment

            Working...
            X