How to create a UML!Type entity and access XSD elements inside WSDLfile [message #1223541] |
Mon, 23 December 2013 13:10  |
Eclipse User |
|
|
|
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 14:28] by Moderator
|
|
|
|
|
|
|
Re: How to create a UML!Type entity and access XSD elements inside WSDLfile [message #1227157 is a reply to message #1227014] |
Fri, 03 January 2014 13:03  |
Eclipse User |
|
|
|
Many thanks Ronan for the link.. I will look it.
The only thing left now is:
How to access the Schema data inside an wsdl file.. once this data makes part of XSD metamodel and not WSDL metamodel. I need to create a class with this data.
Being my transformation WSDL -> XSD as you know. You have any ideas?
And if you find your transformations files.. I would really appreciate that.
[Updated on: Fri, 03 January 2014 13:13] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04641 seconds