Extension to EMF to support loading WSDL and XSD documents within an EAR
file. Since a the files in an EAR are physically a JAR within a JAR,
we also support a custom scheme, "archive:/" which can open streams and
within these nested JARs. To configure a ResourceSet for the ArtifactResolver
use the following steps:
Resource.Factory rf = ArtifactResouceFactoryImpl.INSTANCE;
Resource.Factory.Registry registry = resourceSet.getResourceFactoryRegistry ();
// Register the resource factory for wbi_artifact protocol
registry.getProtocolToFactoryMap ().put (
ArtifactResourceFactoryImpl.WBI_ARTIFACT_PROTOCOL, rf);
registry.getExtensionToFactoryMap ().put ("xsd", rf);
registry.getExtensionToFactoryMap ().put ("wsdl", rf);
resourceSet.getAdapterFactories ().add (ArtifactURIResolver.getFactory ());
resourceSet.setURIConverter (ArtifactURIConverter.INSTANCE);
If a WSDL target namespace is spread across several documents the elements
are merged into a single model.