1

I want to access the shared library native paths using jython scripts

libraries = AdminConfig.list('Library').split('\n')

this returns a list of libraries.

In libraries.xml

<libraries:Library xmi:id="Library_1443450998699" name="MY_TOOLKIT" description="AMY_TOOLKIT" isolatedClassLoader="false">
    <classPath>MY_TOOLKIT</classPath>
    <nativePath>/mypath_TOOLKIT/lib/path.jar</nativePath>

I want to access each library's native paths..

How can I achieve this .... Any Help.. thanks in advance

theRoot
  • 571
  • 10
  • 33
  • look into XML data scraping, which is a pretty simple, built in process for python. http://stackoverflow.com/questions/1912434/how-do-i-parse-xml-in-python might help a bit. you can also use regex, which would be even more simple – R Nar Oct 26 '15 at 15:29
  • @RNar Directly accessing the XML configuration of WebSphere Application Server might work, but it's not recommended. – Brett Kail Oct 26 '15 at 16:13

1 Answers1

1

Iterate over the values returned from list/split and use AdminConfig.showAttribute(lib, "nativePath"). See the Commands for the AdminConfig object using wsadmin scripting topic in the Knowledge Center for other AdminConfig operations.

Brett Kail
  • 33,593
  • 2
  • 85
  • 90