More illumination? ( was RE: Contradictions regarding transitivity of wsdl:import)

OK, let's step back a bit...

For the same of illustration, lets say that somehow, let's not worry
about exactly how, I construct a component model per the current WSDL
spec *without* using WSDL documents. And let's say that the resulting
component model contains components from namespaces A, B and C. It is
clear to me that any component in any of those namespaces can refer to
any other component in any one of those namespaces. So a binding
component in namespace A could refer to an interface component in
namespace A, B or C.

Now, we have a rule, just like XML Schema, that at the WSDL document
level, in order to legally refer to components in another namespace a
WSDL document MUST contain a wsdl:import statement for that namespace.
Such a statement is a necessary condition to refer to components in
another namespace *at the document level*. So it's a serialization
detail, but an important one, because it tells a WSDL parser what other
namespaces it's going to need in order to resolve references in the
document its parsing.

So, when I come to serialize my 'synthetic' component model, as I write
out the WSDL document for namespace A, I look to see what other
components in other namespaces are referred to by the components in
namespace A. If only components from B are referenced, then as I write
out a.wsdl, I only need a wsdl:import for B. Same for components in
namespace B. If they only refer to components in namespace C, then as I
write out b.wsdl, I only need a wsdl:import for C.

If components in A refer to components in B and C, then when I write out
a.wsdl, I need two wsdl:imports one for B and another for C.

Does that help?

Gudge

Received on Saturday, 16 April 2005 00:50:37 UTC