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 » sending HTTP Reply having pdf as payload

Post new topic  Reply to topic
 sending HTTP Reply having pdf as payload « View previous topic :: View next topic » 
Author Message
kishoreraju
PostPosted: Fri Aug 28, 2009 9:49 am    Post subject: sending HTTP Reply having pdf as payload Reply with quote

Disciple

Joined: 30 Sep 2004
Posts: 156

Hi All,

I am working on Http service in message broker which will receives a request from the browser.
Based on the request type , It need to retrieve the document from the file system and send the response as pdf to the caller(Need to be displayed as pdf in browser).

For this Req I have created a flow with HTTPinputNode-->compute Node-->HttpReply Node.

please give some suggestions on the below.

Is it possible to implement the above using message broker?

If yes what are all the HTTP Reply headers that i need to set?

What is the format of the http Payload?

I tried with the below code but it did't work

SET OutputRoot.HTTPReplyHeader."Content-Type"='application/pdf';
SET OutputRoot.BLOB.BLOB=CAST(SomeString as BLOB);


Thanks in Advance..
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Aug 28, 2009 9:59 am    Post subject: Re: sending HTTP Reply having pdf as payload Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kishoreraju wrote:
Hi All,

I am working on Http service in message broker which will receives a request from the browser.
Based on the request type , It need to retrieve the document from the file system and send the response as pdf to the caller(Need to be displayed as pdf in browser).

For this Req I have created a flow with HTTPinputNode-->compute Node-->HttpReply Node.


How do you think you will read from the File system in a Compute node?
Back to top
View user's profile Send private message
kishoreraju
PostPosted: Fri Aug 28, 2009 10:30 am    Post subject: Reply with quote

Disciple

Joined: 30 Sep 2004
Posts: 156

Thanks for your quick resposne.

i am Calling a Java class from the compute node to read the file from the file system.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Aug 28, 2009 10:40 pm    Post subject: Re: sending HTTP Reply having pdf as payload Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

kishoreraju wrote:


If yes what are all the HTTP Reply headers that i need to set?

What is the format of the http Payload?

I tried with the below code but it did't work

SET OutputRoot.HTTPReplyHeader."Content-Type"='application/pdf';
SET OutputRoot.BLOB.BLOB=CAST(SomeString as BLOB);


Thanks in Advance..


I see two main issues that you face.
1) Getting the HTTPReply message formatted correctly
2) Getting the PDF properly cast to a BLOB

The first can be acheived by importing the relevant sample flow into your Toolkit, deploying it after inserting TraceNodes at the relevant parts of the flow and examining the usertrace output.

The second is a pretty common issue. There are many posts in this forum where casting something to a BLOB is discussed. Take a look at them and see what you learn.

Try these and then by all means come back to us with more questions.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
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 » sending HTTP Reply having pdf as payload
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.