Re: Semantics of wsdl:import

Hi Jacek,

Thanks ! I completely agree with you.
I knew this point, but I have seen folks specify schemas as top level
imports, which is incorrect, but is pardoned by most API representations for
WSDL, like JSR 110.[WSDL4J]

After the User models a top level XSD import, he could go ahead and treat
the imported artifact as a blackbox and treat it the way he/she wishes to.
Let me take the freedom of adding a code snippet of an incorrect usage of
imports in a JSR 110 implementation.
List imports = definition.getImports();
Import importedXSD = (Import)imports.get(0);
String xsdLocation = importedXSD.getLocationURI();
//use W3C  DOM APIs to parse the XSD and retrieve the information.
Document xsdDoc = domParser.parse(new InputStream(xsdLocation));
This is obviously a hackish way to bypass the specification.
There are two options.
1) Explicitly have a mention in the specification that <wsdl:import> *can *
only* be used to import *WSDL descriptions, and is an error otherwise.
2) The plain vanilla attribute name "location" on the <import> could
possibly be misleading -it does not indicate what all can be imported into
the wsdl description. Need to think of an alternative to this attribute
naming- lets say "wsdlLocation".

rgds,
Menon

On 2/14/06, Jacek Kopecky <jacek.kopecky@deri.org> wrote:
> Hi Menon,
>
> AFAIK, XML Schemata are intended to be imported in WSDL using xs:import
> element within wsdl:types. In general, any extension (incl. XML Schema)
> that would like to import some external documents must provide its own
> import element (in the absence of a working general standard like
> xinclude).
>
> So wsdl:import only imports WSDL documents. This makes it possible for
> the processor to assume that what is being imported is WSDL, and in case
> that import is not used (for example only one interface is used that
> doesn't reuse anything from the imported WSDL; ignoring other interfaces
> in the importing WSDL), it needn't even be resolved.
>
> Hope this helps,
>
> Jacek
>
> On Tue, 2006-02-14 at 13:35 +0530, Ramkumar Menon wrote:
> > Should the specification also talk in detail on the semantics of
> > importing documents into the WSDL that are not WSDL descriptions
> > themselves -lets say an XSD ?
> > -menon
> > --
> > Shift to the left, shift to the right!
> > Pop up, push down, byte, byte, byte!
> >
> > -Ramkumar Menon
> >  A typical Macroprocessor
> >
> >
>
>


--
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!

-Ramkumar Menon
A typical Macroprocessor

Received on Tuesday, 14 February 2006 11:20:07 UTC