Quantcast
Viewing all articles
Browse latest Browse all 5661

using x.509 as authentication token to access BAPI using JCO

we are trying to access BAPI using JCO with x.509 certificate. The certificate is passed as a base64 encoded string. But are getting the following exception

 

Exception in thread "main" com.sap.conn.jco.JCoException: (103) JCO_ERROR_LOGON_FAILURE: Syntax error in received X.509-client certificate (base64-coding)

 

                

Properties connectProperties = new Properties();

               connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR, "01");

               connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "500");     

                 connectProperties.setProperty(DestinationDataProvider.JCO_LANG, "en");             

               //createDestinationDataFile(connectionProperty, connectProperties);

               connectProperties.setProperty(DestinationDataProvider.JCO_X509CERT,certStr);

               destinationProvider.addDestination(connectionProperty, connectProperties);

               destinationProvider.registerDestinationProperty();

               JCoDestination destination = JCoDestinationManager.getDestination(connectionProperty);

               destination.getRepository();

 

could somebody help to fix this issue?


Viewing all articles
Browse latest Browse all 5661

Trending Articles