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

Accessing systems.xml in Java Custom iView

Hello,

Is there a way to access the systems.xml file within a Java Custom iView ?. If so would appreciate any tips.

Basically I need to read the name of an sap server (example BW system) that is in the systems.xml file in the java file.

Thanks,

Sunil

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 18, 2004 at 06:32 PM

    Hello...

    test with this:

    // get the system landscape service

    ILandscapeService landscapeService = (ILandscapeService) request.getService(ILandscapeService.KEY);

    // get the system specified in the property File in property "SystemIdentifier"

    String systemName = myProfile.getProperty(PROPERTY_SYSTEM);

    // get the system information from landscape service

    IEPSystem system = landscapeService.getEPSystem(systemName);

    // check if system is maintained in systems.xml

    if (system != null) {

    // get all attribute of system defined in systems.xml

    Iterator it = system.getAttributeKeys().iterator();

    while (it.hasNext()) {

    String key = (String) it.next();

    //you can look for the attribute that you want

    String str = system.getAttribute(key); // value of atribute

    }

    }

    I hope helps you...

    Thanks

    Luis..

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 19, 2004 at 01:24 PM

    Hello...

    Landscape is a service that you must add in the file properties.

    ServicesReference=htmlb, usermanagement, landscape

    To do import in your file java:

    com.sapportals.portal.prt.service.landscape.ILandscapeService;

    Luis...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 20, 2004 at 02:43 PM

    Thanks. It works. Now i can access attributes within system.xml.

    However is there a way to access attributes of any custom xml file (as opposed to systems.xml) I choose to implement in Java iView. If so, using the code above how would i be able to reference this custom xml file in my java code.

    Many thanks for your help

    Sunil

    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.