axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Blue <>
Subject RE: Importing a schema into a WSDL
Date Thu, 06 Mar 2003 09:43:52 GMT
I have also included the reply from Mike who could not mail to the list.
I have got this working now using both relative links to the xsd and URL
references to it. The problem seems only to occur when I use the ant task. 
Are there any docs for the ant WSDL2Java task as I don't seem to be able to
find any?

-----Original Message-----
From: Oliver Adler [mailto:Oliver.Adler@SYRACOM.DE]
Sent: 06 March 2003 06:40
Subject: AW: Importing a schema into a WSDL

Hi Neil,
we had the same problem, there is a workaround. Copy all referenced schema
into the same folder where the wsdl file is located. The remove all paths
from the schemas (import / includes )and from the wsdl
<import namespace="  <http://importer/test> http://importer/test"
        schemaLocation="  <file:///home/nblue/test.xsd> test.xsd"/>


This should work.





Oliver Adler, Senior Consultant
SYRACOM Systems AG - "The IT-Architects" 

Otto-von-Guericke-Ring 15 
D-65205 Wiesbaden 

Tel +49 6122-9176-0 
Fax +49 6122-9176-11 
Mobil +49 175-1853998 


Ein Unternehmen der SYRACOM Gruppe - "The Business- & IT-Architects" 


-----Urspr√ľngliche Nachricht----- 
Von: Neil Blue [] 
Gesendet: Mi 05.03.2003 18.39 Uhr 
An: '' 
Betreff: Importing a schema into a WSDL


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: Type {  <http://importer/test>
http://importer/test}testType is referenced but
not defined

I have tried to use an import statment like:

  <schema xmlns="  <>">
        <import namespace="  <http://importer/test> http://importer/test"
        schemaLocation="  <file:///home/nblue/test.xsd>

then I refer to it with:

 <wsdl:message name="methodRequest">
      <wsdl:part name="request" type="imp:testType"/>

where the schema is simple:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="  <>"
        xmlns="  <http://importer/test> http://importer/test"
        targetNamespace="  <http://importer/test> http://importer/test">

<xs:complexType name="testType">
                <xs:element name="test" type="xsd:string"/>

the imp namespace is defined in the definitions as:

xmlns:imp="  <http://importer/test> http://importer/test"

Could anyone explain how to do this please :)


[Neil Blue] 



I posted this message to axis-user, but by some reason my messages cannot
make through to this destination. I don't know why. I already tried last
week from my different email accounts with the same result.

So I just forwarding it directly to you. Hope this will help you. 



-----Original Message----- 
From: Sapozhnikov, Michael 
Sent: Wednesday, March 05, 2003 3:01 PM 
To: '' 
Subject: RE: Importing a schema into a WSDL 



1. Try to use instead of file:/// <file:///> ... http URL of the file on
your website or location relative to your wsdl (e.g. if your xsd is in
parent directory: schemaLocation="../test.xsd")

If this does not help: 
2. You could have global element in your schema of that type and change from
"type" to "element" in your message, e.g. 

<xs:element name="testType" type="testType"/> 

<xs:complexType name="testType"> 
                <xs:element name="test" type="xsd:string"/> 

and message itself: 

 <wsdl:message name="methodRequest"> 
      <wsdl:part name="request" element="imp:testType"/> 

With this two changes in place this works for me. 



View raw message