Recently I received a task to digital sign outgoing XML Invoice. That is not a problem at all - you can do this easily in SOAP adapter as adapter module. But my assignment had restriction, that because that XML was processed by ccBPM (in XI 7.0) - that signing had to be done in mapping - not in adapter.
I have spent few days to crack this problem, but finally - with extensive help of scn.sap.com - I was successful.
I developed java mapping and for signing itself I used Apache Santuario -- Index library - but because I was on SAP XI 7.0 - I had to use old version for java 1.4.2. Actual version in java 1.4 branch is Apache Download Mirrors.
Also - before you can start - you have to get XI jar libraries from your system. You have two options - ask some basis person to gather those files for you or you can use that excellent ABAP report - but because you need also jar libraries from different paths - you need to modify slightly modify that report. I strongly recommend to see that wiki page to know more about getting those jars - Where to get the libraries for XI development - Process Integration - SCN Wiki
So what jar libraries do we need?
library name | where to get it |
---|---|
aii_af_trace.jar | /usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/ext/ |
aii_map_api.jar | /usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/apps/sap.com/com.sap.xi.services |
aii_utilxi_misc.jar | /usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/ext/ |
commons-logging-1.1.jar | Apache Santuario |
keystore_api.jar | /usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/ interfaces/keystore_api/keystore_api.jar |
keystore.jar | /usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/services/keystore/keystore.jar |
xmlsec-1.4.8.jar | Apache Santuario |
So if you have downloaded Apache Santuario, get SAP NWDS running and have all these libraries we can start with java mapping.
When I worked on this problem - I have found, that there is no complete guide how to access KeyStore and digitally sign XML from mapping. So I hope that this blog post will help somebody to not spent a lot of hours on implementing signing as I did :smile:
Aloha !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |