Re: Semantics of wsdl:import

Hi Jacek,

Thanks.
I am attaching the snippet from section 5.1.2 from WS-I Basic Profile 1.0
R2001 A DESCRIPTION MUST only use the WSDL "import" statement to import
another WSDL description.
R2002 To import XML Schema Definitions, a DESCRIPTION MUST use the XML
Schema "import" statement.
R2003 A DESCRIPTION MUST use the XML Schema "import" statement only within
the xsd:schema element of the types section.

Moreover, the section 4.1 in WSDL 2.0 2.0 Part 1 [Core Language] makes a
clear statement regarding the point about "Including descriptions". See
below.
"A location *attribute information item* is of type xs:anyURI . Its actual
value is the location of some information about the namespace identified by
the targetNamespace *attribute information item* of the containing
description *element information item*.It is an error if the IRI indicated
by location does not resolve to a WSDL 2.0 document."

If I am right, it would be necessary to make a similar and explicit
statement on  "import descriptions".[Section 4.2]

thanks,
Menon

On 2/14/06, Jacek Kopecky <jacek.kopecky@deri.org> wrote:
>
> Hi Menon,
>
> in WSDL 1.1, AFAIK, it was common practice to import schemas using
> wsdl:import, even use this to import schemas from within WSDL files. I
> don't know how the Basic Profile regulates this, if at all; from the
> point of view of common practice, the code snippet below is correct.
>
> WSDL 2.0 talks about importing schemas in the section on types (section
> 3), and in section 4.2.2 it says that wsdl:import location attribute
> gives a hint about where a WSDL 2.0 document can be found for this
> import. So I believe WSDL 2.0 is clear enough about how the various
> imports are to be done.
>
> There may be a problem that for people coming from WSDL 1.1, this
> information is not spelled out clearly enough; this may be an editorial
> issue which the WG could consider.
>
> Best regards,
>
> Jacek
>
> On Tue, 2006-02-14 at 16:50 +0530, Ramkumar Menon wrote:
> > 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
>
>
>


--
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:57:19 UTC