Dear Expert,
Need your expert suggestion on my below requirement
Requirement description
1- My scenario is SAP to third party (bank), i.e. synchronous RFC to HTTP_AAE, will be utilizing PI 7.3(dual stack) or above.
2- I need to apply digital signature on whole XML payload, and then encode it to base64 and send it to bank over a single stringfiled called “strSignature”.
3- Again I need to encode the same whole payload XML to base64 and send it over another single string field called “strXmldata”.
4- Bank will accept the request on their HTTP URL only over HTTPS/SSL, so need to enable SSL as well at transport level.
5- For more detail Below Pseudocode is from bank, what I have tried to explain above.
digitalSiganature = get_Digital_Signature( paymentReqXMLfile )
base64DigitalSignature = base64_Encoding (digitalSiganature)
base64XmlData = base64_Encoding(paymentReqXMLfile)
replyXML = HTTPS_Post_B2B(“strSignature=”+ base64DigitalSignature+”&strXmldata=”+ base64XmlData)
processReplyXMLinCORE-SYSTEM(replyXML
Questions
1- I am planning to use PGP add-ons for digital signature and custom adapter module to encode it to base64. However, PGP will sign the whole XML in adapter module level at runtime, but I need to sign and encode the whole xml and map it to single string field (strSignature) before sending to bank URL. Is it possible to do in PGP or do I need Java mapping at mapping level? If java mapping is the only option, any sample java code for my requirement?
Also how can I map the whole XML payload to single string field strSignature? Will the below java mapping serve my purpose?
http://wiki.scn.sap.com/wiki/display/XI/Whole+Payload+to+a+XML+field
2- How can I map the one XML payload to two string field (strSignature, strXmldata)
3- As I will have to enable SSL at transport level and need sign the XML message, do I need two certificate (stores the public key) from certificate authority or only one?
Your help always appreciated.
Thanks,
Farhan