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 IndexWebSphere Message Broker (ACE) Supportsending emails with attachments

Post new topicReply to topic
sending emails with attachments View previous topic :: View next topic
Author Message
odsa84
PostPosted: Fri May 13, 2016 1:24 pm Post subject: sending emails with attachments Reply with quote

Newbie

Joined: 12 May 2016
Posts: 7

Hello I have an Email Output node to send mails, but these mails can came with attachments files. I did this in my compute node
"SET OutputRoot.BLOB.adjunto = CAST( OutputRoot.XMLNSC.Input.adjunto AS BLOB CCSID 1208);" I'm not sure I'm ok with that, that's my first doubt, the second one is, how can I send with SoapUI an attachment file to my service, I have this:
Code:
<body>
            <correo>
               <correoDe>lags080213@sriprueba.ad</correoDe>
               <!--1 or more repetitions:-->
               <correoPara>odsa250216@sri.ad</correoPara>
   
               <!--Zero or more repetitions:-->
               <correosCC></correosCC>
               <!--Zero or more repetitions:-->
               <correosCCO></correosCCO>
               <asuntoCorreo>Correo de Prueba</asuntoCorreo>
               <!--Optional:-->
               <htmlCorreo></htmlCorreo>
         [b]<adjunto>file:C:\SRI\JAVA\f4e-all-templates.zip</adjunto>[/b]               
            </correo>
            <codigoMensaje>1</codigoMensaje>
            <codigoPlantilla>2</codigoPlantilla>
            <alcanceCorreo>1</alcanceCorreo>
 </body>

and in my Request properties I put "Enable Inline File = true"
when I run a debug I get in "adjunto" just garbage ("PK????????°Z™H???????????????basic.htmlUX??¤a?W,`?Wõ???í]ësã6’ÿî¿?Qj¯6·zð-ѱ}›Lr—TenS›Ií]]Ý?Z„....") things like that.[/quote]
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri May 13, 2016 3:41 pm Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9396
Location: US: west coast, almost. Otherwise, enroute.

Moved to Broker forum.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
VishnuPrasadS
PostPosted: Sun May 15, 2016 11:08 am Post subject: Reply with quote

Apprentice

Joined: 22 Feb 2013
Posts: 28
Location: Pune, India

First mistake that i see in your post is
SET OutputRoot.BLOB.adjunto = CAST....

OutputRoot.BLOB.BLOB is the valid structure that you should be using

- - - - - - - - - - - - - - - - - - - - - - - - - - - -

You can send files/attachments with SoapUI
Learn about
1) Soap with attachment , MTOM
If your service expects attachments in binary form , not as part of soap xml structure, then click on the button "Attachments (0)" at botton left corner of soapui in "Request Editor" view.
2) SOAP with attachment inlined in payload (hex value in two byte ascii or base64)
If your service expects attachment within xml structure, then you can manually put base64 version of attachment in its proper xml tag
Back to top
View user's profile Send private message Send e-mail
odsa84
PostPosted: Mon May 16, 2016 7:00 am Post subject: Reply with quote

Newbie

Joined: 12 May 2016
Posts: 7

VishnuPrasadS thanks for your replay
What do you means exactly when you say "attachments as part of soap xml structure".
My service going to need some parametres, an email object with send to, send from, subject, etc. etc. attributes included an attachment attribute, Is that what you mean with "soap xml structure"

Code:
<body>
            <correo>
               <correoDe>lags080213@sriprueba.ad</correoDe>
               <!--1 or more repetitions:-->
               <correoPara>odsa250216@sri.ad</correoPara>
   
               <!--Zero or more repetitions:-->
               <correosCC></correosCC>
               <!--Zero or more repetitions:-->
               <correosCCO></correosCCO>
               <asuntoCorreo>Correo de Prueba</asuntoCorreo>
               <!--Optional:-->
               <htmlCorreo></htmlCorreo>
               <adjunto>base64 attachment version</adjunto>               
            </correo>
            <codigoMensaje>1</codigoMensaje>
            <codigoPlantilla>2</codigoPlantilla>
            <alcanceCorreo>1</alcanceCorreo>
 </body>


What would be the difference between expects attachments as part of soap xml structura and the other form, MTOM as you mensioned.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon May 16, 2016 8:36 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You should be using the MIME parser for emails.

There is documentation on building an email with multiple parts - attachments and etc. - using the MIME parser.

I'm not sure where SOAP came into this discussion, given that you are using EmailOutput.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
odsa84
PostPosted: Mon May 16, 2016 10:53 am Post subject: Reply with quote

Newbie

Joined: 12 May 2016
Posts: 7

There is somthing that I didn't mention before and maybe is important, the soap xml structure that I send is for a service that send the message to a queue and then my email service read from the queue and try to send the email, as you can see there are two services, in the firts one I do some logic and put the message in a queue and in the second one I read the queue and send the email.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon May 16, 2016 11:16 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So.

Use SOAP/JMS to write the message to the queue using the SOAPRequest node.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
odsa84
PostPosted: Mon May 16, 2016 12:13 pm Post subject: Reply with quote

Newbie

Joined: 12 May 2016
Posts: 7

mqjeff
What would be the benefit to do that?
Use SOAP/JMS to write the message to the queue using the SOAPRequest node.

I'm using a simple MQOutput node and the message goes to the queue and the mail service starts automaticaly as it should be.

Note: I'm a IIB junior developer; If isn't a problem for you, please explain your answer just a litter. Thanks you.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon May 16, 2016 12:27 pm Post subject: Reply with quote

Grand High Poobah

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

odsa84 wrote:
please explain your answer just a litter.


You need to explain your question just a litter first.

Are you:

- putting a message to a queue where an email service picks it up and sends it?
- sending a SOAP message to some email service which then sends it?
- invoking the email service directly with an EmailOutput node?

What you need to do varies for each of these scenarios.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon May 16, 2016 12:32 pm Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

odsa84 wrote:
mqjeff
What would be the benefit to do that?
Use SOAP/JMS to write the message to the queue using the SOAPRequest node.


I was guessing that the email service read the soap message.

If it doesn't, if it reads it's own format, then you can do what you're already doing - use an MQOutput node.

The email flow has to build the message using the MIME parser - to include anything other than a base email message.

You've said your emails can have attachments. That means you have to use the MIME Parser.

The soap flow has to do whatever it needs to do to process the incoming message using the SOAP/XMLNSC parser.

You asked how to use SOAPUi. Well, you read the docs on SOAPUi.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) Supportsending emails with attachments
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.