Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352480 - Class WSDLResourceFactoryImpl should be exposed via class in exported package
Summary: Class WSDLResourceFactoryImpl should be exposed via class in exported package
Status: NEW
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: wst.wsdl (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: wst.wsdl CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 11:38 EDT by Mirko Seifert CLA
Modified: 2011-07-19 11:38 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mirko Seifert CLA 2011-07-19 11:38:26 EDT
Build Identifier: I20110613-1736

The class org.eclipse.wst.wsdl.internal.util.WSDLResourceFactoryImpl is internal and as such not intended to be used by clients. This is fine, since the implementation of class might be changed in the future.

However, to load a WSDL file in Java, this resource factory must be registered with EMF. It is registered via the respective extension point of EMF, but this does only work if the platform is running. If the platform is not running, clients must register the factory manually. If one does so, a warning is raised which says that internal classes should not be used.

To avoid this, other plug-ins that register resource factories, use a public class (e.g., WSDLResourceFactory) that has a public final static field (e.g., INSTANCE) that holds an instance of the factory implementation (i.e., WSDLResourceFactoryImpl). The type of this field should be org.eclipse.emf.ecore.resource.Resource.Factory. Introducing this indirection allows clients to properly use the WSDL resource factory, which can be exchanged by another internal implementation at the same time.

Reproducible: Always