Error loading WSDL/XSD -> UML transformation programmatically [message #1263655] |
Tue, 04 March 2014 12:10  |
Eclipse User |
|
|
|
Hi guys.. my transformation is WSDL and XSD as source metamodels to UML as target metamodel.
I'm trying to run this transformation (that works perfectly fine, tested) with Plugin ATL approach. But I'm receiving the following error:
Metamodel contains several classifiers with same name: DOMElement
Metamodel contains several classifiers with same name: DOMDocument
org.eclipse.m2m.atl.core.ATLCoreException: Error loading CalculadoraService.wsdl: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://schemas.xmlsoap.org/wsdl/' not found. (file:///C:/Users/Michel/atl/WSDL2UMLPlugin/CalculadoraService.wsdl, 3, 504)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:70)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:84)
at WSDL2UMLPlugin.files.WSDL2UML.loadModels(WSDL2UML.java:134)
at WSDL2UMLPlugin.files.WSDL2UML.main(WSDL2UML.java:84)
Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://schemas.xmlsoap.org/wsdl/' not found. (file:///C:/Users/Michel/atl/WSDL2UMLPlugin/CalculadoraService.wsdl, 3, 504)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:65)
... 3 more
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://schemas.xmlsoap.org/wsdl/' not found. (file:///C:/Users/Michel/atl/WSDL2UMLPlugin/CalculadoraService.wsdl, 3, 504)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(XMLHandler.java:2599)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefix(XMLHandler.java:2429)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1306)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1475)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1026)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:77)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1008)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:719)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:163)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:253)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 5 more
This uri 'http://schemas.xmlsoap.org/wsdl/ is used inside my .wsdl file as in xmlns="http://schemas.xmlsoap.org/wsdl/". My WSDL uri metamodel is: http://www.eclipse.org/wsdl/2003/WSDL.
And the following registering was automatically by ATL Plugin:
EPackage.Registry.INSTANCE.put(getMetamodelUri("WSDL"), org.eclipse.wst.wsdl.WSDLPackage.eINSTANCE);
EPackage.Registry.INSTANCE.put(getMetamodelUri("UML"), org.eclipse.uml2.uml.UMLPackage.eINSTANCE);
EPackage.Registry.INSTANCE.put(getMetamodelUri("XSD"), org.eclipse.xsd.XSDPackage.eINSTANCE);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl());
I really don't know what to do more (I tried to add some packages to classpath)... Have anyone faced a similar problem with WSDL or have some ideia to give?
Many thanks in advance!
|
|
|
|
|
Re: Error loading WSDL/XSD -> UML transformation programmatically [message #1264139 is a reply to message #1263809] |
Tue, 04 March 2014 21:29  |
Eclipse User |
|
|
|
Hi Denis,
it worked.. many thanks man. I did:
The registering for wsdl
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put
("wsdl",
new WSDLResourceFactoryImpl()
{
public Resource createResource(org.eclipse.emf.common.util.URI uri)
{
WSDLResourceImpl xmiResource = new WSDLResourceImpl(uri);
return xmiResource;
}
});
And then.. the registering for xsd
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put
("xsd",
new XSDResourceFactoryImpl()
{
public Resource createResource(org.eclipse.emf.common.util.URI uri)
{
XSDResourceImpl xmiResource = new XSDResourceImpl(uri);
return xmiResource;
}
});
|
|
|
Powered by
FUDForum. Page generated in 1.45187 seconds