Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » How to create a UML!Type entity and access XSD elements inside WSDLfile
How to create a UML!Type entity and access XSD elements inside WSDLfile [message #1223541] Mon, 23 December 2013 18:10 Go to next message
michel souza is currently offline michel souzaFriend
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 Go to previous messageGo to next message
michel souza is currently offline michel souzaFriend
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

Re: How to create a UML!Type entity and access XSD elements inside WSDLfile [message #1225386 is a reply to message #1225213] Sun, 29 December 2013 17:06 Go to previous messageGo to next message
michel souza is currently offline michel souzaFriend
Messages: 18
Registered: December 2013
Junior Member
I figured the problem. UML!Type being abstract I cannot use it directly... so I used instead a UML!DataType. However, this only works because these types are not classes defined in my uml model.

Now I have another problem because I want to use as a type of my attributes classes that are defined in my model. So, I cannot use a Datatype because if I do so.. I will have an inconsistency once I have already an UML!Class with that name.

Example:

I have in my model GreeterSOAPHandler, GreeterAdapter and GreeterSOAPServlet (all of them being UML!Class).

The GreeterSOAPHandler class has a GreeterAdapter instance.
The GreeterSOAPServlet class has a GreeterSOAPHandler instance.

So I cannot use UML!Datatype.. because it's going to create a DataType (GreeterSOAPHandler for example) but I have already my UML!Class (GreeterSOAPHandler).

In this way.. I'd want to figure a way to use my UML!Class(es) instead of creating Datatypes.
Re: How to create a UML!Type entity and access XSD elements inside WSDLfile [message #1227014 is a reply to message #1225386] Fri, 03 January 2014 09:45 Go to previous messageGo to next message
Ronan B is currently offline Ronan BFriend
Messages: 273
Registered: July 2009
Senior Member
Hi Michel,
You can take a look at Appendix B of my thesis at http://www.computing.dcu.ie/~rbarrett/thesis.pdf I did a WSDL->UML transformation. The thesis doesn't contain all the code but it outlined the tricky bits. If you want the full transform i'm sure I can find it at home.
Regards,
Ronan
Re: How to create a UML!Type entity and access XSD elements inside WSDLfile [message #1227155 is a reply to message #1227014] Fri, 03 January 2014 17:58 Go to previous messageGo to next message
michel souza is currently offline michel souzaFriend
Messages: 18
Registered: December 2013
Junior Member
No Message Body

[Updated on: Fri, 03 January 2014 18:12]

Report message to a 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 18:03 Go to previous message
michel souza is currently offline michel souzaFriend
Messages: 18
Registered: December 2013
Junior Member
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 18:13]

Report message to a moderator

Previous Topic:Issue when helper does not match equivalent elements
Next Topic:ATL dynamic creation and referencing
Goto Forum:
  


Current Time: Fri Apr 19 20:46:45 GMT 2024

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

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

Back to the top