[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [ATL] uml2wsdl

Hello,

unique a écrit :
> Hi everybody,
> 
>    I want to make a transformation from uml to wsdl , now my problem is
> that it doesn't make a nesting.
> 
> My code is as following :
> ------------------------------------------------------------------------------------
> --@atlcompiler atl2006
> 
> module onlinesale_merge2wsdl; -- Module Template
> create OUT : WSDL from IN :UML;
> 
> ---------------------
> helper context UML!Class def: hasStereotype(stereotype :
> String) : Boolean =
> 	self.getAppliedStereotypes()->exists (c | c.name = stereotype);
> ---------------------
> 
> helper context UML!Package def : getElementbyStereotypeName(stereotype :
> String) : Set(UML!Class)=
> 	self.packedElement->select(c|c.oclIsKindOf(UML!Class) and
> c.hasStereotype(stereotype));
> 
> ---------------------
> helper context UML!Class def : getAttr() : Sequence(UML!Property)=
> 	self.ownedAttribute->collect();
> ---------------------
> 
> rule Definition{
> 	from c : UML!Package(c.oclIsTypeOf(UML!Package) and
>                              c.name='Class Package')
> 	
>         to d :WSDL!Definition(
> targetNamespace <-'edu.xidian.ictt.webservices.bpelmodeling.wsdl',
> 	eTypes <- c.getElementbyStereotypeName('Data'),
> 	eMessages <- c.getElementbyStereotypeName('Message'),
> 	ePortTypes <- c.getElementbySterotypeName('PortType')
> 			      )
> 
> ----------------------
> rule Class2Message{
> 	from u : UML!Class(
> 			  u.hasStereotype('Message')
> 		          )
> 	to t : WSDL!Message(
> 			    qName <- u.name,
> 			    eParts <- u.getAttr()
> 			   )
> }
> 
> ------------------------------------------------------------------------------
> 
> But I just get the result as following :
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <wsdl:Definition xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI";
> xmlns:wsdl="http://www.eclipse.org/wsdl/2003/WSDL"/>
> 

The transformation may have fail. Do you check the error log ?

Best regards,

William

> 
> 
> I can't find where it is wrong . Who can help me ??
> 
> 
> Best regrads