Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Error loading WSDL/XSD -> UML transformation programmatically
Error loading WSDL/XSD -> UML transformation programmatically [message #1263655] Tue, 04 March 2014 17:10 Go to next message
michel souza is currently offline michel souzaFriend
Messages: 18
Registered: December 2013
Junior Member
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 #1263734 is a reply to message #1263655] Tue, 04 March 2014 18:40 Go to previous messageGo to next message
michel souza is currently offline michel souzaFriend
Messages: 18
Registered: December 2013
Junior Member
I put this line:

EPackage.Registry.INSTANCE.put("http://schemas.xmlsoap.org/wsdl/", org.eclipse.wst.wsdl.WSDLPackage.eINSTANCE);

trying to register the package. It seems to work.. but now I face another problem.. i'm getting the following error message:

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.ClassNotFoundException: Class 'definitions' is not found or is abstract. (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.ClassNotFoundException: Class 'definitions' is not found or is abstract. (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.ClassNotFoundException: Class 'definitions' is not found or is abstract. (file:///C:/Users/Michel/atl/WSDL2UMLPlugin/CalculadoraService.wsdl, 3, 504)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObjectFromFactory(XMLHandler.java:2251)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObjectFromFactory(XMLHandler.java:2242)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1339)
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
Re: Error loading WSDL/XSD -> UML transformation programmatically [message #1263809 is a reply to message #1263734] Tue, 04 March 2014 20:01 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Hello Michel,

Have you tried registering the WDSL resource factory for the .wsdl file
extension? You stack trace shows that the default XMI resource factory is used
currently.

Example: http://www.eclipse.org/forums/index.php/t/123514/

Regards,
Dennis


Cheers,
Dennis
Re: Error loading WSDL/XSD -> UML transformation programmatically [message #1264139 is a reply to message #1263809] Wed, 05 March 2014 02:29 Go to previous message
michel souza is currently offline michel souzaFriend
Messages: 18
Registered: December 2013
Junior Member
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;
}
});
Previous Topic:[EMFTVM] Could resolve functions return null when no image found ?
Next Topic:accessing created target elements in called rule
Goto Forum:
  


Current Time: Thu Apr 25 12:17:48 GMT 2024

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

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

Back to the top