Component Diagram: Web Service

Question for a component diagram for a call and return type web service:

In a component diagram do I show two connections one for a call and repsonse or is it implied that the call and response are part of the same flow?

Any ideas?

I find your use of call and response a bit confusing given that we’re talking about components. My understanding of the purpose of a component diagram is to model the structural relationship between components of a system. That is, activity and flow isn’t modelled in a component diagram. I think of it as who provide what for whom.

In an attempt to answer your question though, perhaps you’re asking whether ports require both an incoming (realisation/circle) and outgoing (usage/socket) interface? No, that is not required. You are allowed to specify that a port is both incoming and outgoing or it could be incoming-only or outgoing-only. If you need to specify bi-directional relationship, then you may specify two interfaces going in opposite directions on a port.