I do have a typical scenerio where I have to add two attachments to the email . we have configured the Smtp port and I created the the attachment ( which is an XML file ). Now partner wants us to sign the XML message and send that signature file as another attachment. So the message will be a MULTIPART message. My problem is how do I create a Signature file for the XML document and send that as a seperate file to the Partner? Please let me know
Thanks for your support
Looking through the wm documentation (Using_XML_Signature_and_XML_Encryption_with_Integration_Server.pdf) here are the services you can use to sign the document:
- pub.xmlsec.sign: generates a signature enveloped in a document
- pub.xmlsec.signEnveloping: generates a signature that envelopes a document
- pub.xmlsec.verify: verifies signatures of all types
It also says:
“To obtain the code for the XMLSec package, send an email to security@webMethods.com, and a copy of the package will be emailed back.”
Then to send the MULTIPART message you can use the MIME services of the WmPublic package to send the mail with to attachments:
Hope that’ll make it.
Thank you for the response. Here is the approach I took to resolve it .
- we have the email port pretty much configured to receive emails.
- the receiving service will take the content based on the Email ( for validation) , creates Mimedata ( using pub.mime.createMimedata) and check for the signature ( using pub.smime.processSignedData) and based on verify Tab result we extract the data and Submit the Xml to TN
On the converse side sending email with two attachments 1) Xml document and 2) signature file
- extracted the data from Tn using Tn services and Used service pub.security.pkcs7:sign to generate the signature. used pub.String:base64encoding to generate the string and attached these two files to the SMtp service.
mathieu, Thank you for your response
hi can some share this pdf
thanks in advance