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 » General IBM MQ Support » Creating MIME Message

Post new topic  This topic is locked: you cannot edit posts or make replies.
 Creating MIME Message « View previous topic :: View next topic » 
Author Message
jennifer.jose26
PostPosted: Thu Dec 02, 2010 6:23 am    Post subject: Creating MIME Message Reply with quote

Newbie

Joined: 02 Dec 2010
Posts: 3

hey,
Does anybody have sample running code to create MIME messages ?

I have the requirement for reading a file that can be a pdf,mp3 etc from a folder , convert it into MIME message with multiple parts of say 10kb each and sending as a reply through HTTP Reply Node...

I managed to get some sample code but seems it doesnt work -

CREATE FIELD OutputRoot.MIME TYPE Name;
DECLARE M REFERENCE TO OutputRoot.MIME;

-- create the Content-Type child of MIME explicitly to ensure the correct order. If we set
-- the ContentType property instead, the field could appear as the last child of MIME.
--CREATE FIELD M."Content-Type" TYPE NameValue VALUE 'multipart/related; boundary=myBoundary';

CREATE FIELD M."Content-Type" TYPE NameValue VALUE 'multipart/mixed; boundary="xxx"; charset="us-ascii"';
CREATE FIELD M."Content-ID" TYPE NameValue VALUE 'new MIME document';

CREATE LASTCHILD OF M TYPE Name NAME 'Parts';
-- some example data – generally this would be available already, perhaps as the result of
-- parsing another subtree.
DECLARE newBlob BLOB InputRoot.BLOB.BLOB;

CREATE LASTCHILD OF M.Parts TYPE Name NAME 'Part';
DECLARE P1 REFERENCE TO M.Parts.Part;

CREATE FIELD P1."Content-Type" TYPE NameValue VALUE 'text/plain';
CREATE FIELD P1."Content-Id" TYPE NameValue VALUE 'part one';
CREATE LASTCHILD OF P1 TYPE Name NAME 'Data';
CREATE LASTCHILD OF P1.Data DOMAIN('BLOB') PARSE(newBlob);

CREATE LASTCHILD OF M.Parts TYPE Name NAME 'Part';
DECLARE P2 REFERENCE TO M.Parts.Part[2];

CREATE FIELD P2."Content-Type" TYPE NameValue VALUE 'text/plain';
CREATE FIELD P2."Content-Id" TYPE NameValue VALUE 'part two';
CREATE LASTCHILD OF P2 TYPE Name NAME 'Data';
CREATE LASTCHILD OF P2.Data DOMAIN('BLOB') PARSE(newBlob);

RETURN TRUE;


Can someone help ?
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 02, 2010 7:07 am    Post subject: Reply with quote

Grand High Poobah

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

Locked as a double post of this
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  This topic is locked: you cannot edit posts or make replies. Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Creating MIME Message
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.