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
------------------------------
Original Message:
Sent: Tue July 16, 2024 10:58 AM
From: Shah Wajahat
Subject: The Header is Empty
hi Steve
i have attached the log of datapower

------------------------------
Shah Wajahat
Original Message:
Sent: Mon July 15, 2024 09:44 AM
From: Steve Linn
Subject: The Header is Empty
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
Original Message:
Sent: Wed July 10, 2024 06:09 AM
From: Shah Wajahat
Subject: The Header is Empty
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
------------------------------