Thanks Anne - that makes  more sense to me now - although in the WSDL spec
( http://www.w3.org/TR/wsdl) it does show an example where a schema
"stockquote.xsd" is imported where the types element would normally be. I
remember this as it confused me at the time - how does a wsdl reader know
that the imported schema is part of the types element ?


----- Original Message -----
From: "Anne Thomas Manes" <[EMAIL PROTECTED]>
To: "axis-user" <[EMAIL PROTECTED]>
Sent: Thursday, March 06, 2003 3:26 PM
Subject: RE: Importing a schema into a WSDL


> The problem might be because he's doing a schema import rather than a wsdl
> import. If you use the <import> element as a child of <schema> within the
> types section with the default namespace for schema, then you are doing a
> schema import. This is a valid use of import -- and it's how you're
supposed
> to import a schema. When you use <import> as a child of <definitions>
using
> the default namespace for wsdl, then you are doing a wsdl import. In this
> case you should only import a wsdl file (not a schema file).
>
> Anne
>
> > -----Original Message-----
> > From: Ben Butchart [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 06, 2003 4:55 AM
> > To: axis-user
> > Subject: Re: Importing a schema into a WSDL
> >
> >
> > My understanding of the WSDL specification is that the import element is
a
> > child of the definitions elements and appears immediately after
> > the opening
> > definitions element. Therefore you don't put the import inside the types
> > element. So if you import the xsd document you don't need the
> > types element
> > at all. See section 2.1.2 of the WSDL specification for an
> > example of this.
> >
> > Ben
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Neil Blue" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 05, 2003 5:39 PM
> > Subject: Importing a schema into a WSDL
> >
> >
> > > Hello,
> > >
> > > I have been building up a WSDL file, and now I need to import
> > schemas from
> > > other locations on our web site.
> > >
> > > But I keep getting an error about the type not being defined. Here is
a
> > > sample of my problem:
> > >
> > > java.io.IOException: Type {http://importer/test}testType is
> > referenced but
> > > not defined
> > >
> > > I have tried to use an import statment like:
> > >
> > >  <wsdl:types>
> > >   <schema xmlns="http://www.w3.org/2001/XMLSchema";>
> > > <import namespace="http://importer/test";
> > > schemaLocation="file:///home/nblue/test.xsd"/>
> > >   </schema>
> > >  </wsdl:types>
> > >
> > > then I refer to it with:
> > >
> > >  <wsdl:message name="methodRequest">
> > >       <wsdl:part name="request" type="imp:testType"/>
> > > </wsdl:message>
> > >
> > > where the schema is simple:
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
> > >         xmlns="http://importer/test";
> > >         targetNamespace="http://importer/test";>
> > > <xs:complexType name="testType">
> > > <xs:sequence>
> > > <xs:element name="test" type="xsd:string"/>
> > > </xs:sequence>
> > > </xs:complexType>
> > > </xs:schema>
> > >
> > > the imp namespace is defined in the definitions as:
> > >
> > > xmlns:imp="http://importer/test";
> > >
> > >
> > > Could anyone explain how to do this please :)
> > >
> > > Neil
> >
>

Reply via email to