Re: importing docs in the same namespace

"Amelia A Lewis" <alewis@tibco.com> writes:
> 
> I've been following this, and wondering.  So I went to look at the WSDL
> 1.1 specification.  If I understand Sanjiva's point here, the argument
> is that WSDL 1.1 permits import of multiple documents with the same
> namespace.  I cannot find any justification for that.

The justification is given in section 2.1.2 - the first paragraph.
Basically it states that its a good design principle to separate
interfaces from implementation. Duh. ;-)

What it doesn't say is whether the two parts (or 3 parts or whatever)
should be in different namespaces or not.

> In section 2.1.1, no direct linkage is made between the targetNamespace
> attribute of an imported WSDL and the namespace attribute of the import
> element, so I suppose it is possible to assign different values to these
> two attributes.

No, I would consider that an error - that was definitely our intent
with WSDL 1.1. You cannot "assign" a different namespace to a WSDL
document than the one that's in the document itself!

> In section 2.1.2, the example specification quite clearly assigns
> different namespaces (matching targetNamespace attribute on definitions
> with namespace attribute on import) to each of the sections of which the
> WSDL is composed.

Yep, it does. Nothing wrong with that.

My belief is that there are lots of scenarios where it makes perfect
sense to have different namespaces for the different parts of
a service description. However, I also believe that in lots of 
other scenarios it'll make perfect sense to use the same namespace.

Forcing use of different namespaces would be akin to forcing 
Java programmers to always put interfaces into a different
package from implementation classes and from classes that are 
data structures (or beans). There are times when that makes sense,
but clearly not always.

> Appendix A, Section 1.1, suggests that one namespace URI may be
> associated with multiple schemas, but further states that the processor
> must disambiguate.  It then suggests that WSDL import works the same
> way, which would suggest that multiple imports of the same namespace are
> not legal.
> 
> In the schema (A 4.1), which I understand to be non-normative, import is
> given a key, based on namespace, strongly implying that all of the
> namespace attributes should be unique.  If import/@namespace maps to
> imported definitions/@targetNamespace (which is not required by the
> language of the 1.1 spec, it appears, but does seem to be the expected
> behavior, and the content of all supplied examples), then there is no
> justification here for importing multiple documents with the same
> namespace.
> 
> So, I'm hoping for a clarification: did the UDDI folks use a style in
> which import/@namespace != definitions/@targetNamespace, and
> definitions/@targetNamespace was not unique?  Or is there another
> example of current best practices in which import/@namespace is not
> unique, or imported definitions/@targetNamespace != import/@namespace?

IMO dissecting the WSDL 1.1 spec is not the way to proceed on this 
topic at least.

What do people feel is the right design point? We have the freedom
to do what we all believe is right (assuming consensus of course!),
so I'd much rather try to see what that is rather than arguing one
way or the other based just on what's in WSDL 1.1. 

Bye,

Sanjiva.

Received on Monday, 7 October 2002 11:29:47 UTC