Skip to Content
author's profile photo Former Member
Former Member

JAVA access to SLD data

i try to access the SLD and retrieve / push the SLD System Data.

But in a "normal" Java Programm done in eclipse.

should be possible ...

so i found some code examples:

ClientFactory factory = ClientFactory.newInstance();
URL url = new URL("http://SERVER:PORT");
HttpRequestSender requestSender = new HttpRequestSender(url, "admin", "password");
CIMOMClient cimomClient = new CIMOMClient(requestSender);
CIMClient cimClient = new CIMClient(cimomClient);
SAP_JCODestinationAccessor jcoAcc = new SAP_JCODestinationAccessor(cimClient);
SAP_JCODestination[] jcos = jcoAcc.enumerateSAP_JCODestinationInstances();

for (int i = 0; i < jcos.length; i++) {
  SAP_JCODestination jco = jcos<i>;
  System.out.println(jco.getName());
}

for that i import

httpclient.jar, lcrclient.jar, logging.jar, sapxmltoolkit.jar, tc_sec_https.jar

but i ran into some errors...

there is no: ClientFactory.newInstance() method

and

jcoAcc.enumerateSAP_JCODestinationInstances() does not work either

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    Posted on Sep 22, 2005 at 08:32 AM

    Hello Eric,

    Hmm, this code runs fine for me. Are you importing

    import com.sap.lcr.api.cimclient.ClientFactory;

    or another ClientFactory? And one more difference:

    use

    final URL url = new URL("http", "SERVER", PORT, "/sld/cimom");

    instead of

    URL url = new URL("http://SERVER:PORT");

    Best regards, Maksim Rashchynski.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 05, 2006 at 02:18 PM

    I have used the above code to get the list of business systems from SLD. But i get the length as 0 in response though i have several business systems in my SLD.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 27, 2009 at 02:20 PM

    Hello,

    I am trying to read SLD data via a webdynpro application. I am using NWDS 7.1.

    Could someone help me with the code? I have done in NWDS 7.0 with java 4 but it seems to be completely different in java 5 or at least I need other packages for the import. Please help!

    Greets,

    Diana

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 26, 2005 at 06:39 AM

    Hi Eric/Maksim,

    When i used your code, it gives compilation error in code stating that invalid reference for type "com.tssap.dtr.client.lib.protocol.session.sessionContext"

    From where i can get this class? Which JAR i need to add in my application?

    Regards,

    Bhavik

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 19, 2016 at 12:42 PM

    Hello Experts!

    I'm trying the same explained in this post, but I'm using NWDS 7.3 with JDK 1.5. The factory.createClient(url, user, pwd) is deprecated and I can't find which class to use.

    Can you please help me? I need to have access to SLD data via Java.

    Thanks,

    Alberto

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.