Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 34205 Details for
Bug 126529
wsdl_content.jsp only wants platform:/resource URLs from finders
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch fix to org.eclipse.wst.ws
126529.org.eclipse.wst.ws.patch.txt (text/plain), 13.92 KB, created by
Chris Brealey
on 2006-02-06 12:35:48 EST
(
hide
)
Description:
Patch fix to org.eclipse.wst.ws
Filename:
MIME Type:
Creator:
Chris Brealey
Created:
2006-02-06 12:35:48 EST
Size:
13.92 KB
patch
obsolete
>Index: plugin.properties >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws/plugin.properties,v >retrieving revision 1.3 >diff -u -r1.3 plugin.properties >--- plugin.properties 14 Jun 2005 20:51:40 -0000 1.3 >+++ plugin.properties 6 Feb 2006 17:36:25 -0000 >@@ -17,6 +17,8 @@ > > # Extension point names > XP_WEB_SERVICE_LOCATOR=Web Service Locator >+X_WEB_SERVICE_LOCATOR_WORKSPACE=Workspace Web Service Locator >+X_WEB_SERVICE_LOCATOR_CATEGORY_WORKSPACE=Workspace WSDL documents > > MSG_ERROR_UNABLE_TO_START_MONITOR=IWAB0001E Unable to monitor port {0} of {1}. > >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws/plugin.xml,v >retrieving revision 1.10 >diff -u -r1.10 plugin.xml >--- plugin.xml 30 Nov 2005 18:39:46 -0000 1.10 >+++ plugin.xml 6 Feb 2006 17:36:25 -0000 >@@ -5,15 +5,23 @@ > > <!-- The following extension point is internal, though likely to be promoted for public use, possibly with changes, in a future release. --> > <extension-point id="locator" name="%XP_WEB_SERVICE_LOCATOR" schema="schema/webServiceLocator.exsd"/> >+ >+ <!-- Extension providing workspace WSDL discovery --> > <extension > point="org.eclipse.wst.ws.locator"> >+ >+ <webServiceLocatorCategory >+ id="org.eclipse.wst.ws.internal.wsfinder.category.workspace" >+ label="%X_WEB_SERVICE_LOCATOR_CATEGORY_WORKSPACE"/> >+ > <webServiceLocator > class="org.eclipse.wst.ws.internal.wsfinder.WorkspaceWSDLLocator" > id="org.eclipse.wst.ws.internal.wsfinder.WorkspaceWSDLLocator" >- label="workspacewsdllocator"> >+ category="org.eclipse.wst.ws.internal.wsfinder.category.workspace" >+ label="%X_WEB_SERVICE_LOCATOR_WORKSPACE"> > org.eclipse.wst.ws.internal.wsfinder > </webServiceLocator> >- </extension> > >+ </extension> > > </plugin> >Index: schema/webServiceLocator.exsd >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws/schema/webServiceLocator.exsd,v >retrieving revision 1.5 >diff -u -r1.5 webServiceLocator.exsd >--- schema/webServiceLocator.exsd 9 Dec 2005 22:42:23 -0000 1.5 >+++ schema/webServiceLocator.exsd 6 Feb 2006 17:36:25 -0000 >@@ -6,33 +6,35 @@ > <meta.schema plugin="org.eclipse.wst.ws" id="webServiceLocator" name="Web Service Locator"/> > </appInfo> > <documentation> >- Extension point is provided to register locators that extend AbstractWebServiceLocator. These locators are used by WebServiceFinder to locate web services for the purpose of web service discovery. >+ This extension point is provided to register locators that extend AbstractWebServiceLocator. >+ These locators are used by WebServiceFinder to locate Web services for the purpose of Web service discovery. > </documentation> > </annotation> > > <element name="extension"> > <complexType> >- <sequence> >+ <all> > <element ref="webServiceLocator" minOccurs="1" maxOccurs="unbounded"/> >- </sequence> >+ <element ref="webServiceLocatorCategory" minOccurs="1" maxOccurs="unbounded"/> >+ </all> > <attribute name="point" type="string" use="required"> > <annotation> > <documentation> >- a fully qualified identifier of the target extension point >+ A fully qualified identifier of the target extension point. > </documentation> > </annotation> > </attribute> > <attribute name="id" type="string"> > <annotation> > <documentation> >- an optional identifier of the extension instance >+ An optional identifier of the extension instance. > </documentation> > </annotation> > </attribute> > <attribute name="name" type="string"> > <annotation> > <documentation> >- an optional name of the extension instance >+ An optional name of the extension instance. > </documentation> > <appInfo> > <meta.attribute translatable="true"/> >@@ -44,29 +46,99 @@ > > <element name="webServiceLocator"> > <complexType> >- <attribute name="id" type="string"> >+ <attribute name="id" type="string" use="required"> >+ <annotation> >+ <documentation> >+ A unique identifier for the Web Service Locator. >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="class" type="string" use="required"> > <annotation> > <documentation> >- <p> >-<code>id</code>Unique identifier for the extension. >-<p> >-<code>class</code>The fully qualified class name for the locator class which extends AbstractWebServiceLocator. >-<p> >-<code>label</code>A label for this locator. >+ The fully qualified class name for the locator class which extends AbstractWebServiceLocator. > </documentation> > </annotation> > </attribute> >- <attribute name="class" type="string"> >+ <attribute name="label" type="string" use="required"> >+ <annotation> >+ <documentation> >+ A short label to identify the Web Service Locator. >+ </documentation> >+ <appInfo> >+ <meta.attribute translatable="true"/> >+ </appInfo> >+ </annotation> >+ </attribute> >+ <attribute name="description" type="string"> >+ <annotation> >+ <documentation> >+ Optionally, a description of the purpose of the Web Service Locator. >+ </documentation> >+ <appInfo> >+ <meta.attribute translatable="true"/> >+ </appInfo> >+ </annotation> >+ </attribute> >+ <attribute name="icon" type="string"> >+ <annotation> >+ <documentation> >+ Optionally, an icon that represents the Web Service Locator. >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="category" type="string"> >+ <annotation> >+ <documentation> >+ Optionally, a category to which the Web Service Locator should belong. >+ </documentation> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <element name="webServiceLocatorCategory"> >+ <complexType> >+ <attribute name="id" type="string" use="required"> >+ <annotation> >+ <documentation> >+ A unique identifier for the category of Web Service Locators. >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="label" type="string" use="required"> >+ <annotation> >+ <documentation> >+ A short label for the category of Web Service Locators. >+ </documentation> >+ <appInfo> >+ <meta.attribute translatable="true"/> >+ </appInfo> >+ </annotation> >+ </attribute> >+ <attribute name="description" type="string"> >+ <annotation> >+ <documentation> >+ Optionally, a description of the category of Web Service Locators. >+ </documentation> >+ <appInfo> >+ <meta.attribute translatable="true"/> >+ </appInfo> >+ </annotation> >+ </attribute> >+ <attribute name="icon" type="string"> > <annotation> > <documentation> >- >+ Optionally, an icon that represents the category of Web Service Locators. > </documentation> > </annotation> > </attribute> >- <attribute name="label" type="string"> >+ <attribute name="category" type="string"> > <annotation> > <documentation> >- >+ Optionally, a parent category under which the Web Service Locator >+ category should be grouped. If absent, the category is considered >+ to be a root category. > </documentation> > </annotation> > </attribute> >Index: src/org/eclipse/wst/ws/internal/wsfinder/WebServiceFinder.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws/src/org/eclipse/wst/ws/internal/wsfinder/WebServiceFinder.java,v >retrieving revision 1.3 >diff -u -r1.3 WebServiceFinder.java >--- src/org/eclipse/wst/ws/internal/wsfinder/WebServiceFinder.java 7 Oct 2005 19:41:44 -0000 1.3 >+++ src/org/eclipse/wst/ws/internal/wsfinder/WebServiceFinder.java 6 Feb 2006 17:36:26 -0000 >@@ -12,8 +12,8 @@ > package org.eclipse.wst.ws.internal.wsfinder; > > import java.util.Iterator; >+import java.util.LinkedList; > import java.util.List; >-import java.util.Vector; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IConfigurationElement; > >@@ -26,16 +26,31 @@ > */ > > public class WebServiceFinder { >- >+ > private static WebServiceFinder instance = null; >- >- private static final String CLASS_ATTRIBUTE= "class"; //$NON-NLS-1$ >- >- public WebServiceFinder() >+ >+ private static final String ELEMENT_LOCATOR = "webServiceLocator"; //$NON-NLS-1$ >+ private static final String ELEMENT_CATEGORY = "webServiceLocatorCategory"; //$NON-NLS-1$ >+ private static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$ >+ private static final String ATTRIBUTE_CLASS = "class"; //$NON-NLS-1$ >+ private static final String ATTRIBUTE_CATEGORY = "category"; //$NON-NLS-1$ >+// private static final String ATTRIBUTE_LABEL = "label"; //$NON-NLS-1$ >+// private static final String ATTRIBUTE_DESCRIPTION = "description"; //$NON-NLS-1$ >+// private static final String ATTRIBUTE_ICON = "icon"; //$NON-NLS-1$ >+ >+ /* >+ * Public construction is not allowed. >+ * Use WebServiceFinder.instance(). >+ */ >+ private WebServiceFinder() > { > super(); > } >- >+ >+ /** >+ * Returns the singleton of <code>WebServiceFinder</code>. >+ * @return The singleton of <code>WebServiceFinder</code>. >+ */ > public static WebServiceFinder instance() > { > if (instance == null) >@@ -58,27 +73,78 @@ > */ > public Iterator getWebServices() > { >- Vector webServices = new Vector(); >+ return getWebServices(null); >+ } > >+ /** >+ * Returns an iterator of WebServiceInfo objects which represent web services found by locators that >+ * have registered using the org.eclipse.wst.ws.locator extension point under the given category. >+ * Locators must extend {@link AbstractWebServiceLocator}. >+ * >+ * Callers can use the getter methods on the WebServiceInfo object to retrieve information on the >+ * web services found. The WebServiceFinder cannot guarantee the level of detail contained in WebServiceInfo >+ * objects returned. This is left to the locator implementations. >+ * >+ * @return iterator of WebServiceInfo objects >+ * @param category The category of locators to use >+ */ >+ public Iterator getWebServices(String category) >+ { >+ LinkedList webServices = new LinkedList(); > WebServiceLocatorRegistry wslr = WebServiceLocatorRegistry.getInstance(); >- > IConfigurationElement[] regElements = wslr.getConfigElements(); >- for (int i = 0; i < regElements.length; i++) { >- try{ >- Object obj = regElements[i].createExecutableExtension(CLASS_ATTRIBUTE); >- >- if (obj instanceof IWebServiceLocator) >- { >- IWebServiceLocator wsl = (IWebServiceLocator)obj; >- List wsList = wsl.getWebServices(); >- webServices.addAll(wsList); >- } >- } >- catch (CoreException ex){ >- >- } >+ for (int i = 0; i < regElements.length; i++) >+ { >+ if (ELEMENT_LOCATOR.equals(regElements[i].getName())) >+ { >+ try >+ { >+ if (category == null || category.equals(regElements[i].getAttributeAsIs(ATTRIBUTE_CATEGORY))) >+ { >+ Object obj = regElements[i].createExecutableExtension(ATTRIBUTE_CLASS); >+ if (obj instanceof IWebServiceLocator) >+ { >+ IWebServiceLocator wsl = (IWebServiceLocator)obj; >+ List wsList = wsl.getWebServices(); >+ webServices.addAll(wsList); >+ } >+ } >+ } >+ catch (CoreException ex){ >+ // Quietly bypass any IWebServiceLocators that failed to be loaded. >+ } >+ } > } > return webServices.iterator(); > } >+ >+ /** >+ * Returns an array of registered Web Service Category IDs. >+ * >+ * @return An array, never null but possibly empty, >+ * of registered Web Service Category IDs. >+ */ >+ public String[] getCategoryIDs() >+ { >+ LinkedList categories = new LinkedList(); >+ WebServiceLocatorRegistry wslr = WebServiceLocatorRegistry.getInstance(); >+ IConfigurationElement[] regElements = wslr.getConfigElements(); >+ for (int i = 0; i < regElements.length; i++) >+ { >+ if (ELEMENT_CATEGORY.equals(regElements[i].getName())) >+ { >+ String id = regElements[i].getAttributeAsIs(ATTRIBUTE_ID); >+ if (id != null) >+ { >+ categories.add(id); >+ } >+ } >+ } >+ return (String[])categories.toArray(new String[0]); >+ } > >+ //TODO: Need another method to return full Category objects, >+ //as in "public WebServiceLocatorCategory getCategories()" >+ //where WebServiceLocatorCategory is a new bean class with properties >+ //mirroring the attributes of a webServiceLocatorCategory extension. > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 126529
:
34193
|
34194
| 34205