on 01-10-2014 5:55 PM
Dear All,
I have I have synchronous scenario(ABAP proxy to bank URL , through HTTP post) where I need to apply the digital signature only on the body of the XML payload. This scenario will be implementing in SAP PI 7.4 dual stack, which is in installation process, I am thinking to use ABAP proxy to SOAP/HTTP_AAE .
You have to build post command with parameter name strXmldata, that parameter will contain the XML request of Bulk Payments (Payroll) process one.
Pseudocode:
digitalSiganature = get_Digital_Signature( bodyReqXML )
base64DigitalSignature = base64_Encoding (digitalSiganature)
paymentReqXMLfile = buildPayrollXml(bodyReqXML, base64DigitalSignature)
replyXML = HTTPS_Post_ZIPPED_DATA_TO_B2B(“strXmldata=”+ paymentReqXMLfile)
processReplyXMLinCORE-SYSTEM(replyXML)
The following is HTML file content, shows how to post that parameter with the Bulk Payments (Payroll) process one XML request:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> </HEAD> <BODY> <FORM action=https://<environment-domain/b2b/epayzipped method=post> <INPUT value='<?xml version="1.0"?> <Message> <Header> <Sender>PARTNERO0001</Sender> <Receiver> RYBK</Receiver> <MessageType>PRMSG</MessageType> <MessageDescription>Payroll Message- 200401M</MessageDescription> <TimeStamp>2004-01-17T14:10:54</TimeStamp> </Header> <Body> <PayrollMessage> <PayrollMessageRef>0000000003666236</PayrollMessageRef> <PayrollMessageType>MT100-Payroll</PayrollMessageType> <PayrollTransactionCount>2</ PayrollTransactionCount> <PayrollTransactionAmount>21187.00</ PayrollTransactionAmount> <PayrollTransaction> <SequenceNum>2000542758</SequenceNum> <TransactionData>:20:2000542758 :32A:040119SAR10632,00 :50:PARNER COMPANY1 :52A:RIBLSARI :53B:/041072711001 :57A:SABBSARI :59:/042021147001 EMPLOYEE NAME1 ADDRESS</TransactionData> </PayrollTransaction> <PayrollTransaction> <SequenceNum>2000542759</SequenceNum> <TransactionData>:20:2000542759 :32A:040119SAR10555,00 :50: PARNER COMPANY1 :52A:RIBLSARI :53B:/041072569701 :57A:RIBLSARI :59:/042679747008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cXFdFQk5UVUFUXENlcnRTcnZcQ2VydEVucm9sbFxQYXRoRmluZGVy LmNybDBWBggrBgEFBQcBAQRKMEgwRgYIKwYBBQUHMAKGOmh0dHA6Ly9XRUJOVFVB VC9DZXJ0U3J2L0NlcnRFbnJvbGwvV0VCTlRVQVRfUGF0aEZpbmRlci5jcnQwCQYF Kw4DAh0FAANBAJv+scYQCrBpkYfWnfj//h5x/g2UJaUdGvDz22s/pK41mKQaFEWI mSZslLa00ZSBhgaDxDJXoxXIAb71YbVZ88AxggEzMIIBLwIBATBvMGQxCzAJBgNV BAYTAlNBMQ8wDQYDVQQIEwZSaXlhZGgxEDAOBgNVBAcTB0NlbnRyYWwxDjAMBgNV BAoTBVNBTUJBMQ0wCwYDVQQLEwRFQ1NEMRMwEQYDVQQDEwpQYXRoRmluZGVyAgcH s/wAAACYMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwG CSqGSIb3DQEJBTEPFw0wMzEyMDgwNjAzMDlaMCMGCSqGSIb3DQEJBDEWBBSVFfAn D24bN8jnzAHA2659KlfDczANBgkqhkiG9w0BAQEFAARA1ZWZPCd9wMt7MCQ/Z+ng +e0keJtKvx/avHG+afV3cUv7u+bLjZ7xPCVYZYKFpKPDpP5KbVadsptQlS2dRQnQ PAAAAAA=</SignatureValue> </Signature> </Message>' name=strXmldata> <INPUT type=submit value=Proceed> </FORM> </BODY> </HTML> |
Figure 11 – Example of a Bulk Payments (Payroll) Process One Post Request
Note:
You can see from the above example, the italic is the URL, and the Bulk Payments (Payroll) file process one xml message in bold passed in the parameter strXmldata.
When you post the above request to the B2B Gateway, the gateway will receive the request analyze it, and answer back in the same session with the Bulk Payments (Payroll) acknowledge.
I am sorry for the big massage, Please suggest me as I am alone PI resource project.
Thanks,
Farhan
Hi Farhan,
You must insert the tag <Signature> inside body, right ?
For that you need use javamapping , and recommend you to use DOM, could you please check my blog that I explain step by step how to insert node into any part of document.
Javamapping inserting nodes into XML structure:
http://scn.sap.com/docs/DOC-45642
Also check this amaizing blog from about digital signature
http://scn.sap.com/docs/DOC-49354
Kind regards,
BR.
Ricardo Viana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Ricardo for your prompt response. yes you are correct I need to insert the signature on tag <Signature> inside body. I am going through the link, I will come back if I need any help.
one more question if you will see they asked me to post the whole message contained in a single string field strXmldata,as shown below.
/Message>' name=strXmldata>
<INPUT type=submit value=Proceed>
</FORM>
could you please help me understand this, how exactly they want. I am not closing this thread now, I will close after testing everything, thanks a ton for your help.
Regards,
Farhan
Farhan,
Just read my blog that you will understand how insert node.
About this srtXmlData, I dont know, let see if another expert could help us.
As I understand it's look like reference of whole xml inside this tag into HTML structure, but not sure.
If you need help, let me know.
Regards,
BR.
Viana.
Thanks Ricardo, I was going through your blog and java code only. First of all great blog pal. Congratulation!!!
The HTML code they have shown just for demonstration purpose to post their URL, do you think, I need to covert the whole xml payload to string and map to strXmldata ?
Thanks,
Farhan
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.