Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Validate Keystore from mapping java UDF (SAP PI 7.4 java only)

0 Kudos

Hi.

First I try to explain the situation.

We have interfaces with AFIP (government agency in Argentina for tax, electronic invoice...)

We don't use the standard scenario for this (that in the SAP Note 1537823 - RG2904 Argentina E-invoice Webservice for Domestic Scenario).

We create the key certificate and all necessary step for upload the Key in SAP PI.

Also we see this key and use it in the channel for this. And works ok.

For a specific interface we need to create a request that contains a xml transform it to cms and this to base64...

To do this we take the java package from the SAP Note and use the java package (wsaaClass.jar/wsaaClass.class)

And create a class con the method we need that is

   public static String create_cms(String loginTicketRequestXML, String keyStorageView, String keyStorageEntry, AbstractTrace trace)


In the program we assign the parameters (XML and put the "Key view" and the "Key entry" with the same name we use in the channel that work ok) But in runtime the message canceled with the following error


Runtime exception when processing target-field mapping ........ ; root message: Exception:[java.lang.SecurityException: Error while accessing keystore Entry: java.security.KeyStoreException: No key found with alias...]


My cuestion is about that maybe this method use and old location (for PI 7.0 or dual stack) when lookup the key...?

Thank for the ideas and help

Regards

Martin


4 REPLIES 4

0 Kudos

Hi

More data here maybe usefull,

The error is in this part of the method

            profile = new SsfProfileKeyStore(keyStore, alias, null);

            trace.addInfo("Accessing keystore Entry");

Thanks

Regards

Martin

0 Kudos

Martím,

Did you resolved the issue? I have the same problem.

Thanks.

0 Kudos

Hello,

Finally, the interface is not completed development in productive enviroment. It is standby. But the issue of the certificate in principle had been resolved. One of the things we did was to register the certificate in the "TrustedCAs" view.
I hope it helps you.


cervantes_nicols
Participant
0 Kudos

Martin,

The issue was solved. We added a role "Key Store" in Guess user.

Thanks.