on 03-31-2016 9:13 PM
I want to retrieve the list of HANAs registered in SLD, but got into an error. What I have done incorrectly?
Wonder is there API docs, sample codes somewhere for the Java WBEM client?
-----------------------------------------------------------------------------------------------------------------------------------
import com.sap.lcr.api.cimclient.CIMClient;
import com.sap.lcr.api.cimclient.CIMOMClient;
import com.sap.lcr.api.cimclient.ClientFactory;
import com.sap.lcr.api.cimclient.HttpRequestSender;
import com.sap.lcr.api.sapmodel.*;
URL url = new URL("http://SERVER:PORT/sld/cimom");
HttpRequestSender requestSender = new HttpRequestSender(url, 'user', 'password');
CIMOMClient cimomClient = new CIMOMClient(requestSender);
CIMClient cimClient = new CIMClient(cimomClient);
// Retrieve list of Message Servers
SAP_BCMessageServerAccessor msgAccessor = new SAP_BCMessageServerAccessor(cimClient);
SAP_BCMessageServer[] msgServers = msgAccessor.enumerateSAP_BCMessageServerInstances(); // Works
// Retrieve list of Application Servers
SAP_BCApplicationServerAccessor appAccessor = new SAP_BCApplicationServerAccessor(cimClient);
SAP_BCApplicationServer[] appServers = appAccessor.enumerateSAP_BCApplicationServerInstances(); // Works
// Retrieve list of DBs
SAP_DatabaseSystemAccessor dbAccessor = new SAP_DatabaseSystemAccessor(cimClient);
SAP_DatabaseSystem[] dbSys = dbAccessor.enumerateSAP_DatabaseSystemInstances(); // Error - ErrorCIM_ERR_FAILED: Failed to create a JavaCIMObject from a CIMInstance for target class: SAP_HDBSystem
Seems there are 3 types of API for SLD: CIM API, SLD API and WBEM API. I used the CIM API which is obsolete and it failed to retrieve the HANA DBs. Should use the WBEM API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.