on 04-02-2007 2:07 PM
Hi all,
I dont know if my questions sounds ignorant but it would be great if anybody could help me out with this.
Can we access the key properties from CIM class in SLD from web dynpro java. If so, could anybody give me a small example of it?
Thanks
Hi, try this:
ClientFactory factory = ClientFactory.newInstance();
URL Url = new URL(sldURL); // sldURL like "http://<host>:<port>/sld/cimom";
CIMOMClient client = factory.createClient(Url, user, password);
CIMClient cimClient = new CIMClient(client);
CIMClass cimClass = cimClient.getCIMClass("<CIMClassName>);
CIMValueNamedInstance[] d = cimClient.enumerateInstances(jcoDestClass.getCIMClassname());
for (int i=0; i <d.length; i++ ) {
CIMValueNamedInstance instance = d<i>;
CIMInstance cimInst = instance.getInstance();
CIMInstancename instName = instance.getInstancename();
CIMKeybindingList bindingList = instName.getKeybindingList();
CIMKeybinding elem = (CIMKeybinding)bindingList.getItem("Name");
CIMKeyValue value = elem.getKeyValue();
String name= value.getValue();
....
}
i suggest u to use debuger for more details)
To make this code builad able and runable u should add reference on 'com.sap.lcr.api.cimclient' library.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
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.