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.  The Header is Empty

    Posted Wed July 10, 2024 06:10 AM

    I am facing an issue The Header is Empty when connecting to url sometime its work and sometime wok fine. I don't understand why this behavior is occur.

    this is gatewayscript using before invoke. kindly help me about this  



    ------------------------------
    Shah Wajahat
    ------------------------------


  • 2.  RE: The Header is Empty

    Posted Mon July 15, 2024 09:45 AM

    Hi Shah,
    It's hard to say just based upon this screen shot.  I'm having to assume to variables URI and PORT are used as variables in your invoke policy's target-url property, so my only guess would be that whatever is in message.body prior to your invoke is not providing those variables with valid information.  Perhaps the times it works the information is valid, and it fails when it is not.  I've never encountered that error before.  Do you have access to the DataPower logs that can provide some more information?
    Regards,
    Steve Linn



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------



  • 3.  RE: The Header is Empty

    Posted Tue July 16, 2024 10:58 AM

    hi Steve 

    i have attached the log of datapower



    ------------------------------
    Shah Wajahat
    ------------------------------



  • 4.  RE: The Header is Empty

    Posted Tue July 16, 2024 11:20 AM

    Hi Shah,
    Looking at the logs, your GatewayScript you put in your initial comment doesn't exactly match what is in your logs.  Still the network errors that follow that are coming from your assembly invoke action doesn't seems to be related to your GatewayScript policy.  The url that is being used by the invoke policy looks ok, and can I assume that the gatewayscript-user log that shows the headers (Content-Type, Server, and Date) are coming from an updated version of your GatewayScript policy and are these the only headers in message.headers?  The error would lead me to believe that message.headers is empty, but without seeing your entire yaml file it is just speculation as to how that could happen.  For example, the Server header in the log record is IBM App Connect Enterprise but seeing that there are only these three headers, that looks suspiciously like response headers from a previously executed invoke policy that sent a request to an ACE Server.  If that invoke wrote its headers to a different context message instead of message, then what is in message.headers?  Could a previous assembly policy somehow be clearing message.headers? I'd need to see more of the API to help further.

    Best Regards,
    Steve Linn



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------



  • 5.  RE: The Header is Empty

    Posted Tue November 26, 2024 11:47 AM

    Hi, I'm facing same issue. Can you please share your thoughts?



    ------------------------------
    Ganesh K
    ------------------------------



  • 6.  RE: The Header is Empty

    Posted Tue November 26, 2024 05:23 PM

    Hi Ganesh,
    As I told Shah, it's hard to say what's going on without the API and a snippet of the logs.  I would suggest you open a PMR and let IBM support assist you.  Debug logs would be valuable and if you can get a packet capture between DataPower and your backend server, even better.
    Best Regards,
    Steve Linn



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------