Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Failed to get the xml catalog user specified entries from the eclipse preference
Failed to get the xml catalog user specified entries from the eclipse preference [message #207311] Wed, 23 January 2008 03:22 Go to next message
Eclipse UserFriend
Hello All,
I am having the code to get the schema url from the xml catalog if i have
entered through plugin(Plugin specified entries).code is given below

List entries = new ArrayList();
ICatalog defaultCatalog =
XMLCorePlugin.getDefault().getDefaultXMLCatalog();
if (defaultCatalog != null) {
// Process default catalog
ICatalogEntry[] defaults = defaultCatalog.getCatalogEntries();
for (int entry = 0; entry < defaults.length; entry++) {
entries.add(defaults[entry]);
}
// Process declared OASIS nextCatalogs catalog
INextCatalog[] nextCatalogs = defaultCatalog.getNextCatalogs();
for (int nextCatalog = 0; nextCatalog < nextCatalogs.length;
nextCatalog++) {
ICatalog catalog = nextCatalogs[nextCatalog].getReferencedCatalog();
ICatalogEntry[] entries3 = catalog.getCatalogEntries();
for (int entry = 0; entry < nextEntries.length; entry++) {
entries.add(nextEntries[entry]);
}
}
}


but if i m entering through user specified enteries this code is not
working.
Can any body help me in this regard of how to get the schema url in JAVA
if i'll make user specified entries dynamically.


Thanks in advance
Debasis
Re: Failed to get the xml catalog user specified entries from the eclipse preference [message #207333 is a reply to message #207311] Wed, 23 January 2008 11:51 Go to previous message
Eclipse UserFriend
Hi Debasis,

I think it's much simpler to go through the URI resolution framework.
Using this framework you can resolve the location of resources, like
schemas, using the various resolvers including the XML catalog. Take a
look at the WSDL validator's URIResolverWrapper class' resolve method [1]
for an example use of the URI resolution framework.

[1]
http://dev.eclipse.org/viewcvs/index.cgi/webservices/plugins /org.eclipse.wst.wsdl.validation/src/org/eclipse/wst/wsdl/va lidation/internal/eclipse/URIResolverWrapper.java?revision=1 .4&root=WebTools_Project&view=markup

Lawrence Mandel
-
Co-author Eclipse Web Tools Platform: Developing Java Web Applications
http://www.eclipsewtp.org
Previous Topic:Adding a server to eclipse
Next Topic:Using J2EE 'server' as a pre-deployment test environment
Goto Forum:
  


Current Time: Thu Jul 03 14:51:48 EDT 2025

Powered by FUDForum. Page generated in 0.22641 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top