File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Web Service in UML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Web Service in UML" Watch "Web Service in UML" New topic
Author

Web Service in UML

John Ip
Ranch Hand

Joined: Mar 04, 2004
Posts: 45
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

Joined: Feb 24, 2010
Posts: 115
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

Joined: Mar 04, 2004
Posts: 45
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

Joined: Feb 16, 2010
Posts: 109
Why don't use @WebService stereotype? It's not standard, but the new SCEA book suggests using some annotations as stereotypes


SCEA 5, SCJP 6 My SCEA Experience
Vlad Varnica
Ranch Hand

Joined: Dec 28, 2002
Posts: 40
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


[Thumbnail for keywords.png]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Service in UML
 
Similar Threads
Coarse-grained entity beans and UML
Problem adding sterotype in Sequence diagram
Webservice and remote ejbs
Exposing EJB as Webservice...
Regarding Class Diagram