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 » SendMailPlugin attachment not showing up [RESOLVED]

Post new topic  Reply to topic
 SendMailPlugin attachment not showing up [RESOLVED] « View previous topic :: View next topic » 
Author Message
isaw
PostPosted: Tue Jan 29, 2008 4:21 am    Post subject: SendMailPlugin attachment not showing up [RESOLVED] Reply with quote

Apprentice

Joined: 09 May 2007
Posts: 45

Hi guys,

I know this topic has been discussed ad nauseum, and I have done numerous searches which have got me to the point that I am at now. But I am stuck on that last hurdle.

I can send an email via the SendMail plugin and receive it, etc, so I know I at least have that part completed. But what I can figure out is how to get the attachment I need mailed...'attached'!

Setup:
~~~~
Input node --> RCD --> Compute Node --> SendMail Node

Specifics:
~~~~~~
Input Node: parses an inbound XML file as MRM (works fine)
- Msg Domain: MRM
- Msg Set: <my msg set>
- Msg Type: <my type>
- Msg Format: XML

RCD: resets the message to XML (looks good)
- Msg Domain: XML : For XML messages (for Version 2 compatibility)
- Reset Msg Domain: <checked>

Compute Node: constructs the sendmail details for the output root.

Code:

SET OutputRoot.XML.Message."From" = 'test@test.com';
SET OutputRoot.XML.Message."To" = '<myaddress@place>';
SET OutputRoot.XML.Message.Subject = 'This is the subject';
SET OutputRoot.XML.Message.Body = 'Can you see the attachment?';
SET OutputRoot.XML.Message.EncodingBase64.(XML.Attribute)ContentType = 'text/xml';
SET OutputRoot.XML.Message.EncodingBase64.(XML.Attribute)Name = 'attachment.xml';
--SET OutputRoot.XML.Attachment = CAST(ASBITSTREAM(InputRoot.BLOB.BLOB OPTIONS RootBitStream) AS BLOB CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);#
SET OutputRoot.XML.Attachment = InputRoot.XML.*;


SendMailNode:
- SMTP srv: <my server>
- Port: 25
- Name of from: <test name>
- Full Name: <test full name>
- BASE64 selected and MIME checked


What happens:
~~~~~~~~~

- My original XML message goes in, hits the Input node and is parsed as MRM -- looks good
- RCD resets to XML -- debug flow shows it looks as it should
- Compute node flows thru fine, no exceptions, and on a breakpoint on the final return, the output root shows:

Code:
OutputRoot
  |__Properties [empty]
  |__XML
       |__Message
       |       |__To
       |       |__From
       |       |__<blah blah>
       |__Attachment
               |___<original xml from Inputroot...>



- hits the Sendmail Node, no issues or errors, breakpoint on flow between CompNode and Sendmail Node shows the info looks good
- email arrives with correct subject, body, names and an attachment.xml but with no data in it.

I can't see what I'm doing wrong. Most of the examples I have seen are people with InputRoot.XML.Attachment's which map easily to the OutputRoot.XML.Attachment.

I *assumed* that once i converted my original MRM into XML and bunged that to the OutputRoot.XML.Attachment, it would work.

Any suggestions?

Thanks guys!
Back to top
View user's profile Send private message
isaw
PostPosted: Tue Jan 29, 2008 5:42 am    Post subject: Reply with quote

Apprentice

Joined: 09 May 2007
Posts: 45

Found my problem....

I was setting the wrong thing...

Instead of this:

Code:
SET OutputRoot.XML.Attachment = InputRoot.XML.*;
 -- or
SET OutputRoot.XML.Attachment = InputRoot.XML;


I should have had this:

Code:
SET OutputRoot.BLOB.BLOB = CAST(ASBITSTREAM(InputRoot.XML OPTIONS RootBitStream) AS BLOB CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);


And it works now. I looked at loads of examples from here and the ones where I thought i would get the example to work had the reference to ~.XML.Attachment which simply wasn't working for me. I needed the BLOB.BLOB.



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 » SendMailPlugin attachment not showing up [RESOLVED]
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.