简体   繁体   中英

Where to add “Headers” in Send-HTTP-Request in TIBCO BW 6.5?

I have created a queue (MyQueueName) in Azure ServiceBus. To send message on that queue I create an Authorization token with a Java class and I pass it in the 'Headers' in POSTMAN

I am doing a POST operation and I am hitting this URL ( https://AzureSampleNamespace.servicebus.windows.net/MyQueueName/messages ) in POSTMAN.

Header contain 3 name/value pair ie:-

1) Authorization :- My Auth Token

2) Host :- AzureSampleNamespace.servicebus.windows.net

3) Content-Type :- text/plain

In the 'Body' of POSTMAN I am just passing a sample raw text as input. When hitting via POSTMAN I am successfully able to send message on my queue and got a '201 created' ( response body is empty)

Now to do the same POST via TIBCO BW 6.5, I created a Timer activity followed by 'Send-HTTP-Request' activity.

In the Send-HTTP-Request, I created its HTTP Client which has Host as 'AzureSampleNamespace.servicebus.windows.net' and Port as '443' [as I am doing HTTPS call].

In the 'Input' tab configuration are:-

1) Method :- 'POST'

2)RequestURI :- '/MyQueueName/messages'

3)PostData:- 'Hello this is a sample text'

Now I created 3 Dynamic Headers, whose name and value contains this :- (Authorization , Host , Content-Type).

When I am running my process.bwp , it goes till Send-HTTP-Request and waits there only. It does not complete the process and is not able to send the message on my queue.

Can anyone please help me in resolving this?

Thanks, Rudra

  1. You can add http headers in the InputEditor tab of the SendHTTPRequest.

  2. On the right side of the configuration you can scroll to Select Header Type Configuration > Create New Type Definition > Ok

  3. Now +ABC sign will be visible where you can add the header elements you need to invoke a request.

  4. Please note the requests which work with POSTMAN may not work with BW if there is a connectivity issue with outbound LB. Send HTTP Request Input Editor

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM