API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#API Connect
#Applicationintegration
#APIConnect
 View Only
  • 1.  HTTPOSTCLOB

    Posted 04/12/23 12:01 PM

    Hi Team,

    When I tried to connect the external api using DB2 HTTPOSTCLOB , getting the bad response.

    SELECT DB2XML.HTTPCLOB                                      
    ('https://xxxxxxxxxx',                      
    cAST ('<httpheader><header name="content-type" value='      
    !!'"application/json"/><header name="cache-control" '       
    !!'value="no-cache"/><header name="authorization" '         
    !!'value="yyyy"/>'
    !!'</httpheader>' AS CLOB(1K) ),                            
    CAST ('{"query": "query Test{parts{name}}"}' as clob(1k)))  
    FROM SYSIBM.SYSDUMMY1;      

    Below is the error which I am getting 

    0 DSNT493I SQL ERROR DURING SQL STATEMENT    FETCH   , TABLE TBLNAME
     DSNT408I SQLCODE = -4302, ERROR:  JAVA STORED PROCEDUE OR USER-DEFINED FUNCTION DB2XML.HTTPPOSTCLOB (SPECIFIC NAME
              DB2XML.HTTPPOSTCLOB) HAS EXITED WITH AN EXCEPTION java.io.IOException: Server returned HTTP response code: 400
              for URL: https:xxxxxxx
     DSNT418I SQLSTATE   = 38000 SQLSTATE RETURN CODE
     DSNT415I SQLERRP    = DSNX9CAC SQL PROCEDURE DETECTING ERROR

    Shall you look this.

    Thanks.                              



    ------------------------------
    Solairaj Jayaraj
    ------------------------------


  • 2.  RE: HTTPOSTCLOB

    Posted 04/13/23 02:15 AM

    Hiya
    i think you might need to ask that elsewhere, eg in a DB2 group. This one is for the IBM API Connect product which I don't think your question relates to?

    good luck

    Chris



    ------------------------------
    Chris Dudley
    ------------------------------



  • 3.  RE: HTTPOSTCLOB

    Posted 04/13/23 02:25 AM

    Hi Chris,

    Good morning !

    Thanks for the update .

    Since this method related to consuming external API , I have posted here . Now, I will check it with DB2 group.

    Thanks. 



    ------------------------------
    Solairaj Jayaraj
    ------------------------------