ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » httprequest node - content length 0

Post new topic  Reply to topic
 httprequest node - content length 0 « View previous topic :: View next topic » 
Author Message
coder99
PostPosted: Mon Nov 11, 2019 2:27 pm    Post subject: httprequest node - content length 0 Reply with quote

Newbie

Joined: 01 Nov 2019
Posts: 4

Hello,

For sending a PUT request to a http server, I'm using an HttpRequest node. The message passes through an ESQL compute node. The issue is that the content length of the message sent to server is 0. The request does not contains any data, although the variable used for the body of the message has content.
How can I pass the content of a put http request from esql code?

The esql code is as follows:

SET OutputLocalEnvironment = InputLocalEnvironment;
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = ...;
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'text/plain';
SET OutputRoot.HTTPRequestHeader."Authorization" = 'Bearer ' || … ;
SET OutputRoot.HTTPRequestHeader."Host" = ...';
SET OutputRoot.BLOB = CAST(InputRoot.BLOB.BLOB as char CCSID 1208 Encoding 815);

The configuration of the HTTPRequest node is

HttpSettings
HTTP method: PUT
HTTP version 1.1
Enable keep-alive <checked>

Request Timeout: 20
HTTP Proxy Location : <blank>
Follow HTTP redirection: <unchecked>

Advanced:
Use whole input message as request : <un-checked>
Request Message Location in Tree : InputRoot.BLOB
Replace input message with web-service response: <checked>
Generate default HTTP headers : <un-checked>

VALIDATION: None
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Tue Nov 12, 2019 2:05 am    Post subject: Re: httprequest node - content length 0 Reply with quote

Knight

Joined: 17 Jul 2017
Posts: 516
Location: UK

coder99 wrote:

SET OutputRoot.BLOB = CAST(InputRoot.BLOB.BLOB as char CCSID 1208 Encoding 815);


hi...assuming your aim is just to copy the input blob to output and set the http headers replace the above part with
Code:
SET OutputRoot.BLOB.BLOB = InputRoot.BLOB.BLOB;


and then change the below setting,

Quote:

Advanced:
Use whole input message as request : <checked>
Request Message Location in Tree : InputRoot


...also ensure that the Compute mode of the Compute node includes Local environment and Message
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » httprequest node - content length 0
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.