How many port-types

Guy Rixon gtr at ast.cam.ac.uk
Wed Jun 9 15:14:04 PDT 2004


Ray,

we spoke in Boston about how web-service operations should be factored into
port types, and particularly about when operation may not appear in the same
port-type.  I've been looking up the WSDL spec and I now understand these
cases when separate port types are required.

1. When two operations MAY NOT be bound to the same protocol then they must be
in separate port-types. This lets the service have two separate ports with
different bindings. However, when two operations MUST have two different
bindings but each operation MAY have both bindings, then they may be in the
same port-type. In this case, the service binds the one port-type to both
bindings.

2. When two operations MAY NOT appear at the same address, then they must be
in separate port-types so that they can be in separate WSDL ports; the WSDL
port element states the service endpoint.  Conversely, when two operations
MUST be available at two endpoints but each operation MAY be provided at both,
then only one port-type is needed. The service can provide two ports, with one
port-type for one port.

3. When two operations differ in properties not described by WSDL, such as the
requirement for WS-Security headers, then they SHOULD be in different
port-types. In some programming models, notably JAX-RPC, these properties are
handled on a per-port basis. E.g. if operation A must always have security and
operation B must be available unsecured, then A and B should appear in
separate ports. If they were declared in one port-type which was used in two
ports, one secured and one not, then a suurious, unsecured copy of A would be
available.

4. If an operation is optional, then it is MUST be in a port type by itself.
My reading of the WSDL spec is that a service must implement all declared
operations of a port-type which it binds in a port. If operations are optinal
as a set (e.g. either all or none may be provided) then they MAY appear in the
same port-type.

I hope this helps.


Cheers,
Guy.

Guy Rixon 				        gtr at ast.cam.ac.uk
Institute of Astronomy   	                Tel: +44-1223-337542
Madingley Road, Cambridge, UK, CB3 0HA		Fax: +44-1223-337523



More information about the grid mailing list