In this post i will be discussing how to send email with MTOM attachments using webMethods services.
Steps:
1. Create a Flow service senderSvc which will get an image file and then convert it to a base64 encoded string. This is our harness service replicating the Data feeder.
2. Create a Flow service service B with the inputs fileName (String) and data (string with the base64Binary contentType set). The output is a success (string) flag. This will be the receiver service.
3. Create a producer WSD receiverWSD for the receiverSvc and set the property attachment enabeld to true.
4. Consume the receiver WSD and make a call to the connector in senderSvc.
5. post the data from senderSvc to be received by receiverSvc and then send to an email using the pub.client:smtp service.
senderSvc:
receiverSvc:
Sample email:
Steps:
1. Create a Flow service senderSvc which will get an image file and then convert it to a base64 encoded string. This is our harness service replicating the Data feeder.
2. Create a Flow service service B with the inputs fileName (String) and data (string with the base64Binary contentType set). The output is a success (string) flag. This will be the receiver service.
3. Create a producer WSD receiverWSD for the receiverSvc and set the property attachment enabeld to true.
4. Consume the receiver WSD and make a call to the connector in senderSvc.
5. post the data from senderSvc to be received by receiverSvc and then send to an email using the pub.client:smtp service.
senderSvc:
receiverSvc:
Sample email:
No comments:
Post a Comment