• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web Service in UML

 
John Ip
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am currently working on the part 2 assignment and have some trouble with showing web services in my Class diagram. I have a stateless session bean which is also a web service endpoint and I dunno how to model this in a UML class diagram. I am thinking of doing this but not sure is it the right way.

-----------------------
<<WSDL service>>
-----------------------
^
l<<realization>>
l
-----------------------
<<statesless session bean>>
-----------------------

Can I simply put a sterotype <<webservice endpoint>> in the session bean class element?? Also I have an adapter class which is a client of an external web service. What sterotype should I use for that class? Do you guys know any tutorial on the internet about modeling web service with UML?

Thanks in advance.

John
 
sivan jai
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be able to do with a implements approach right - usually you have a SLSB that implements a interface that is annotated with @WebService. If you can show that on the UML it would work?
 
John Ip
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply. Perhaps my question should be how to show a EJB 3.0 webservice endpoint in a class diagram and component diagram.

Any help will be much appreciated.
 
Dmitri Ericsson
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't use @WebService stereotype? It's not standard, but the new SCEA book suggests using some annotations as stereotypes
 
Vlad Varnica
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can either use stereotypes and then get EJB3 annotations in your code see an example I found at : http://www.forum-omondo.com/documentation_eclipseuml_2008/Eclipse_Database/Add_JPA_Properties/index.html or just keywords.
The stereotype is live synchronized with the code, I mean that if you enter Entity as a stereotype in your class diagram then you get @Entity in the code of the java class. You can also set association one to one, one to many etc.... http://www.forum-omondo.com/documentation_eclipseuml_2008/Eclipse_Database/Create_associations/index.html

I recommend keywords because more simple and let development team to implement java annotation that I still personally don't fully understand
keywords.png
[Thumbnail for keywords.png]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic