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 » Creating Html table for the body in email message using esql

Post new topic  Reply to topic
 Creating Html table for the body in email message using esql « View previous topic :: View next topic » 
Author Message
Vamsi Krishna
PostPosted: Tue Jul 29, 2014 7:28 pm    Post subject: Creating Html table for the body in email message using esql Reply with quote

Acolyte

Joined: 12 May 2014
Posts: 53

hi, I would like to know how to use the html table format to mention the description of the body in the table for email message can any one show me the sample esql code for it in this format. pls can anyone help me how to write it in esql urgent


Last edited by Vamsi Krishna on Tue Aug 05, 2014 4:21 am; edited 3 times in total
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jul 30, 2014 5:08 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There isn't an HTML parser that comes with Broker.

So you'll have to construct the HTML document by hand, as a BLOB.
Back to top
View user's profile Send private message
Vamsi Krishna
PostPosted: Wed Jul 30, 2014 9:28 pm    Post subject: Reply with quote

Acolyte

Joined: 12 May 2014
Posts: 53

mqjeff wrote:
There isn't an HTML parser that comes with Broker.

So you'll have to construct the HTML document by hand, as a BLOB.


yeah i know that iam asking how can it be done when i try to use html code as character and casting it to blob its working fine i like to know is there any other way
i have seen a reply on some topics like this

Code:
CREATE LASTCHILD OF OutputRoot.XMLNSC.html.body.p TYPE (XMLNSC.PCDataValue) VALUE line1 AS ref;
SET ref.(XMLNSC.Attribute)bgcolor = 'red';
SET ref.(XMLNSC.Attribute)border = '1';
-- etc...
but iam unable to do that
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jul 31, 2014 5:35 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

No.

Don't create an XMLNSC document and try and pretend it's HTML.

No.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jul 31, 2014 7:32 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Most people do not put presentation logic into their ESB. ESBs are for linking applications together, not for showing data to humans.
If you design your message flow to emit a simple XML document then it should be simple to craft an html page with a CSS stylesheet that displays the XML as a table.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 31, 2014 8:19 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kimbert wrote:
Most people do not put presentation logic into their ESB. ESBs are for linking applications together, not for showing data to humans.




kimbert wrote:
If you design your message flow to emit a simple XML document then it should be simple to craft an html page with a CSS stylesheet that displays the XML as a table.


Ingenious!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jul 31, 2014 8:26 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kimbert wrote:
If you design your message flow to emit a simple XML document then it should be simple to craft an html page with a CSS stylesheet that displays the XML as a table.


Which doesn't work unless you include the HTML page in the email message being sent out.

Which is more complicated, but maybe a better idea, than building it by hand.

But wasn't the question. The question was "How do I build an HTML document in ESQL".
Back to top
View user's profile Send private message
Vamsi Krishna
PostPosted: Thu Jul 31, 2014 6:40 pm    Post subject: Reply with quote

Acolyte

Joined: 12 May 2014
Posts: 53

mqjeff wrote:
kimbert wrote:
If you design your message flow to emit a simple XML document then it should be simple to craft an html page with a CSS stylesheet that displays the XML as a table.


Which doesn't work unless you include the HTML page in the email message being sent out.

Which is more complicated, but maybe a better idea, than building it by hand.

But wasn't the question. The question was "How do I build an HTML document in ESQL".


No the question was how to insert a html table in the message body of an email iam using email out node for sending exception details in the above image format
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Jul 31, 2014 10:50 pm    Post subject: Reply with quote

Jedi Council

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

Vamsi Krishna wrote:


No the question was how to insert a html table in the message body of an email iam using email out node for sending exception details in the above image format


A web page table is just a set of HTML tags. Can't you put them into a CHAR variable and then cast it as a Blob when complete?
Have you tried something like
Code:

declare myChar, myText CHAR;
set myText = 'Off to Glasgow to see the Cycling Road Race';

set myChar = '<h1>Hello World</h1>';
set myChar = myChar || myText || ' <hr><h2>The End</h2>';

set OutputRoot.BLOB.BLOB = cast(myChar as BLOB);


This isn't tested but something like that might do what you want. If the length of the string is an odd number you may need to pad it with a space.

Code:

declare iLen INTEGER length(myChar);
if MOD(iLen,2) <> 0 then
 set myChar = myChar || ' ';
end if;


go on, give it a go. you never know, it might work (normal disclaimers apply).
_________________
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
Vamsi Krishna
PostPosted: Fri Aug 01, 2014 1:31 am    Post subject: Reply with quote

Acolyte

Joined: 12 May 2014
Posts: 53

smdavies99 wrote:
Vamsi Krishna wrote:


No the question was how to insert a html table in the message body of an email iam using email out node for sending exception details in the above image format


A web page table is just a set of HTML tags. Can't you put them into a CHAR variable and then cast it as a Blob when complete?
Have you tried something like
Code:

declare myChar, myText CHAR;
set myText = 'Off to Glasgow to see the Cycling Road Race';

set myChar = '<h1>Hello World</h1>';
set myChar = myChar || myText || ' <hr><h2>The End</h2>';

set OutputRoot.BLOB.BLOB = cast(myChar as BLOB);


This isn't tested but something like that might do what you want. If the length of the string is an odd number you may need to pad it with a space.

Code:

declare iLen INTEGER length(myChar);
if MOD(iLen,2) <> 0 then
 set myChar = myChar || ' ';
end if;


go on, give it a go. you never know, it might work (normal disclaimers apply).


Thanks smdavies99 i have tried similar to this iam trying if any other way to solve this type thanks for your code and your 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 » Creating Html table for the body in email message using esql
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.