on 01-24-2006 3:19 PM
Hi,
I try to access the SLD and retrieve the SLD System Data via Java Program(using Servlet).
But i always get an empty jco Destinations array.
Please see the java code below:
ClientFactory factory = ClientFactory.newInstance();
try {
final URL url = new URL("http", host, port, "/sld/cimom");
HttpRequestSender requestSender =
new HttpRequestSender(url, user, password);
CIMOMClient cimomClient = new CIMOMClient(requestSender);
CIMClient cimClient = new CIMClient(cimomClient);
SAP_JCODestinationAccessor jcoAccessor = new SAP_JCODestinationAccessor(cimClient);
SAP_JCODestination[] jcoDestinations = jcoAccessor.enumerateSAP_JCODestinationInstances();
the varible - "jcoDestinations" return rempty
Am I on the right track?
Can someone provide me a code snippet, link, document,... where i can find more information how to access the SLD
Thanks
Boris
This is very similar, but I'm using the App Server Jco Destination. It is different from the Jco Destination.
CIMInstancenameList ciminst = null;
SAP_AppServJCODestinationAccessor jdsa = null;
SAP_AppServJCODestination jds[] = null;
// connect to the given sld url with the given usernamd and pwd
URL url = new URL(sldUrl);
ClientFactory factory = ClientFactory.newInstance();
CIMOMClient client = factory.createClient (url, sldUsername, sldPassword);
CIMClient cc = new CIMClient(client);
CIMClientHandle cch = (CIMClientHandle) cc;
// access the app serv jco destinations and enum them
jdsa = new SAP_AppServJCODestinationAccessor(cch);
jds = jdsa.enumerateSAP_AppServJCODestinationInstances();
Thanks,
Ray
If helpful, please award points.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Does any one have the Java doc API for "com.sap.lcr.api"
Thanks an advance
Boris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Ray and Maksim.
Its working fine now, I managed to retrieve JCO definitions.
But I have another question:
How can I retrieve J2EE/R3 System Landscape data from the SLD (for example- J2ee servers names and ports, patch versions, etc).
Thanks
Adam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I haven't done this yet, but in NWDS, go to Package Explorer, find your project, and open up the SAP_SYSTEM_ADD_LIBS ... com.sap.lcr.api.cimclient and then open com.sap.lcr.api.sapmodel; you will see the literally hundreds (if not thousands) of classes in this jar. One that looks like it might apply is SAP_ApplicationSystemInstance.class. Open that up and you see the methods listed; such as getHostName, getSAPSystemName, getInstanceNumber, ...
There are many others that may apply as well, so you might have to write some test code and review the data coming back.
Ray
Hi Boris,
Check whether you really have JCo destinations on your SLD. Code looks OK and in case it runs without exceptions it seems like you don`t have JCo destinations.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.