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 » EmailOutput node - Cant attach an image correctly

Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next
 EmailOutput node - Cant attach an image correctly « View previous topic :: View next topic » 
Author Message
elenzo
PostPosted: Mon Oct 07, 2013 11:18 am    Post subject: Reply with quote

Acolyte

Joined: 22 Aug 2006
Posts: 53

I am not asking for training, i am asking for help.
At first I simply used XMLNSC but as a result I could only attached one file and the image was not showed neither, so I changed to MIME.
Yes, part of the code was found on internet (in this forum if I am not wrong)
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Oct 07, 2013 11:21 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

elenzo wrote:
I am not asking for training, i am asking for help.
At first I simply used XMLNSC but as a result I could only attached one file and the image was not showed neither, so I changed to MIME.
Yes, part of the code was found on internet (in this forum if I am not wrong)


Simply copy and paste source code without reading the source code is not wise. You should write your own code so you clearly understand what each line does.

Have you imported and run this sample ?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
elenzo
PostPosted: Mon Oct 07, 2013 11:27 am    Post subject: Reply with quote

Acolyte

Joined: 22 Aug 2006
Posts: 53

My friend, I think you are not reading what i am writing (or maybe you dont understand my no native english).
I understand what my code does, I have many years working with WMB, but in this case I run into something I cant figure out how to do it and that is why I created this post, If you cant help me dont worry, may be someone else can, but please dont keep post it comments with no suggestion
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Oct 07, 2013 11:28 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

elenzo wrote:
My friend, I think you are not reading what i am writing (or maybe you dont understand my no native english).
I understand what my code does, I have many years working with WMB, but in this case I run into something I cant figure out how to do it and that is why I created this post, If you cant help me dont worry, may be someone else can, but please dont keep post it comments with no suggestion


The suggestion is to import and run the email sample, which demonstrates
Quote:
Recipients specified on the form receive the message as an email in the appropriate format with any attachments.

_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
elenzo
PostPosted: Mon Oct 07, 2013 11:29 am    Post subject: Reply with quote

Acolyte

Joined: 22 Aug 2006
Posts: 53

I did that, but the code that use is java, not esql and is not attaching any image to the email...
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Oct 07, 2013 11:34 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

elenzo wrote:
I did that, but the code that use is java, not esql and is not attaching any image to the email...


The sample is known to work. Make the sample work, then insert a Trace node between the JCN and EmailOutput node which will demonstrate the correct Logical Message Tree you need. Reading the Logical Message Tree, write the equivalent code in ESQL.

I asked you what are the values you are setting for Attachment Content Type, Attachment Content Encoding, and Multipart Content Type. Your reply was that you were not setting these values. However, according to the InfoCentre, these values must be set. By reviewing the Email sample, and the Logical Message Tree produced by the sample, you can implement the functionality you want.

Don't say the sample does not work. The sample does work.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Oct 07, 2013 11:34 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Ok, so you're adding a MIME part that says it's a base64 encoded string, but in fact, it is a BLOB string.

Check the text contents of the email. See if the image starts with X' and then has a bunch of stuff that is not the right stuff.
Back to top
View user's profile Send private message
elenzo
PostPosted: Mon Oct 07, 2013 11:44 am    Post subject: Reply with quote

Acolyte

Joined: 22 Aug 2006
Posts: 53

mqjeff wrote:
Ok, so you're adding a MIME part that says it's a base64 encoded string, but in fact, it is a BLOB string.

Check the text contents of the email. See if the image starts with X' and then has a bunch of stuff that is not the right stuff.


Thanks for yuor reply mqjeff
The image doesnt start with X, is like R0lGODlh/gE+APcAANzh7Dp/e ... I dont know what this is, my guess is that i need to do something with base64. What other way can an image come on a message?
I think the problem is here:
Code:
CREATE FIELD P2."Content-Transfer-Encoding" TYPE NameValue VALUE 'base64';

I am not sure if 'base64' is a valid value
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 07, 2013 12:02 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I guess the point of my question was - is the string in the TEXT OF THE EMAIL the same as the string in the TEXT OF THE XML?

They should be the same.

If you have a sample email that "works", you should look at the TEXT of it to see what the mime parts are.

It's possible, also, that the email that "works" is actually just an HTML document in single MIME part.
Back to top
View user's profile Send private message
elenzo
PostPosted: Mon Oct 07, 2013 12:13 pm    Post subject: Reply with quote

Acolyte

Joined: 22 Aug 2006
Posts: 53

I think the problem here is my english

The MIME message has 2 parts, the first part contains the HTML of the email. This part is show exactly as I want on my email, there is no problem here. The second part of the MIME is the attachment, which it is send on the email, but, instead of send it as an image (even if I call it *.png) when I see it in the email is an unknow file (if I download it and try to open with image viewer it says that the image is wrong) and as it is a separator bar, should be include it on the body of the email.
But to simplify the case, right know the only thing I want is to know how can I add an image that come on the XML message with a base64 encoding to my email as an attachment
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Oct 07, 2013 9:02 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

What have you tried? Have you tried a simple BLOB with binary form for the MIME? Or having the base 64 encoded text passed as a BLOB into the attachment and defined as base 64 in the MIME part?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
elenzo
PostPosted: Tue Oct 08, 2013 4:05 am    Post subject: Reply with quote

Acolyte

Joined: 22 Aug 2006
Posts: 53

fjb_saper wrote:
What have you tried? Have you tried a simple BLOB with binary form for the MIME? Or having the base 64 encoded text passed as a BLOB into the attachment and defined as base 64 in the MIME part?


Hi fjb_saper. I tried first whitout using MIME and then with MIME. I dont know how to do this " having the base 64 encoded text passed as a BLOB into the attachment and defined as base 64 in the MIME part" can you help me ?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Oct 08, 2013 4:23 am    Post subject: Reply with quote

Jedi Council

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

If I were the OP I'd go back to the Sample flow and add trace nodes at various points in the flow and use it to handle an attachment. Then I'd re-engineer my flow to five me the same message tree structure at the same key points. That's how I learned to use the Email Output Node. It is not that difficult. It just takes a bit of time and a little experimentation.
_________________
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
elenzo
PostPosted: Tue Oct 08, 2013 5:12 am    Post subject: Reply with quote

Acolyte

Joined: 22 Aug 2006
Posts: 53

I ve been doing that, and once again i can send attachments without problem, the only problem here is when I have to attach an image, thats what I cant do, probably because I dont know how to encode it
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 08, 2013 5:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

elenzo wrote:
I ve been doing that, and once again i can send attachments without problem, the only problem here is when I have to attach an image, thats what I cant do, probably because I dont know how to encode it


Again, what I'd do is I'd send a message from broker that fails to work.

I'd then examine the resulting MIME document as plain text, potentially from the SMTP server logs, possibly from a regular email client.

I'd then try and find an email sent from something else that is *known* to work, and examine the resulting MIME document as plain text.

Alternatively, you could go examine the SMTP and MIME standards (RFCs) and see what the proper value for the ContentTypeEncoding is - but I suspect you'll find out that it needs to be "whatever matches the data".

And all that you've shown of the data is some kind of stringified version in an XML document and I don't personally choose to attempt to deconstruct it to find out if it's already base64 encoded or not, much less figure out if it's had CCSID corruption.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next Page 2 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » EmailOutput node - Cant attach an image correctly
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.