How to create a UML!Type entity and access XSD elements inside WSDLfile [message #1223541] |
Mon, 23 December 2013 18:10 |
michel souza Messages: 18 Registered: December 2013 |
Junior Member |
|
|
Hi everybody I'm having troubles in creating a UML!Type entity for my parameters of my methods (including the return type) and my attributes.
My transformation is WSDL to UML class diagram.
My rules for creating a class called Adapter that has a set of methods each one containing only one parameter (UML!Paramter) that has a type (UML!Type) and a return (return, being a special kind of UML!Parameter that has direction = 'return' and equally a UML!Type).
rule CreatingAdapter {
from
s: WSDL!PortType
to
t: UML!Class(
name <- s.qName.toString().getName().concat('Adapter'),
ownedOperation <- s.eOperations->collect(e | thisModule.CreatingOperationByPortType(e))
)
}
Here I create my class giving its name and its set of methods = ownedOperation
lazy rule CreatingOperationByPortType {
from
s: WSDL!Operation
to
t: UML!Operation(
name <- s.name,
ownedParameter <- Sequence{thisModule.CreatingReturn(s.eOutput), thisModule.CreatingParameter(s.eInput)}
)
}
I create the set of methods using this rule for creating an Operation. An operation has a set of parameters (but these operations has always only one parameter).
lazy rule CreatingReturn{
from
s: WSDL!Input
to
t: UML!Parameter(
type <- thisModule.CreatingType(s.eMessage.qName.toString().getName().toUpperfirst()),
direction <- 'return'
)
}
Each method has obviously a return that is a special type of parameter.. with the direction = 'return' and a type
lazy rule CreatingType{
from
typename : String
to
t: UML!Type(
name <- typename
)
}
This lazy rule creates a type from a String
lazy rule CreatingParameter{
from
s: WSDL!Output
to
t: UML!Parameter(
name <- 'request',
type <- thisModule.CreatingType(s.eMessage.qName.toString().getName().toUpperfirst())
)
}
This is my rule for creating my parameter that has a type and call the lazy rule above.
So my problems is this way of creating the UML!Type entity is not working... if I try to create the rest my class and its set of methods without return type and parameters types but with the parameters name works fine. So the problem is really in UML!Type creating. Anyone has any idea what I'm doing wrong - I don't have any logs!
My second doubt is: I want to create another class using elements in my .wsdl file that makespart of the schema (XSD.ecore metamodel). How can I access this elements inside my .wsdl file once they are not part of the WSDL metamodel but from the XSD metamodel??? My source metamodel is WSDL!!!
[Updated on: Thu, 26 December 2013 19:28] Report message to a moderator
|
|
|
Re: How to create a UML!Type entity and access XSD elements inside WSDLfile [message #1225213 is a reply to message #1223541] |
Sun, 29 December 2013 03:47 |
michel souza Messages: 18 Registered: December 2013 |
Junior Member |
|
|
I got a log message.. maybe this can help. I need to create a Type but I have this message saying that it's not a valid classifier:
Metamodel contains several classifiers with same name: DOMElement
Metamodel contains several classifiers with same name: DOMDocument
org.eclipse.m2m.atl.engine.emfvm.VMException: The class 'Type' is not a valid classifier
at CreatingType#16(WSDL2UML.atl)
local variables: self=WSDL2UML : ASMModule, typename='SayHelloResponse'
at CreatingReturn#42(WSDL2UML.atl[83:12-83:89])
local variables: self=WSDL2UML : ASMModule, s=IN!<unnamed>, t=OUT!SayHelloResponse
at CreatingOperationByPortType#37(WSDL2UML.atl[73:31-73:67])
local variables: self=WSDL2UML : ASMModule, s=IN!sayHello, t=OUT!sayHello
at __applyCreatingAdapter#30(WSDL2UML.atl[61:49-61:90])
I could put the rest.. having this error: You can only use links to eclipse.org sites while you have fewer than 5 messages.
[Updated on: Sun, 29 December 2013 03:47] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03844 seconds