Sorry, this advice is incorrect.

<xsd:include> is a way of building up the components in a single namespace
from separate fragment schemas.  The schema specified by <xsd:include>
*must* have the same target namespace as the including schema (or neither
must have a target namespace).  The namespace attribute should not be
provided and has no effect.  See
http://www.w3.org/TR/xmlschema-1/#composition (section 4.2.1).

<xsd:import> requires a namespace attribute and requires that the value of
that attribute be different from the target namespace of the importing
schema.

Jeff
----- Original Message ----- 
From: Anne Thomas Manes
To: [EMAIL PROTECTED]
Sent: Tuesday, June 29, 2004 8:06 AM
Subject: RE: WSDL and schema include question


You also must specify the namespace that you are importing:

<wsdl:types>
<xsd:schema targetNamespace="urn:BigTicket">
<xsd:include namespace="urn:BigTicket" schemaLocation="./BigTicket.xsd" />
</xsd:schema>
</wsdl:types>




From: Hrishikesh Kumar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 29, 2004 3:23 AM
To: [EMAIL PROTECTED]
Subject: Re: WSDL and schema include question


You need to mention the relative path of the xsd in the WSDL (may be
./BigTicket.xsd)



Shantanu Sen <[EMAIL PROTECTED]>
06/29/2004 02:05 PM
Please respond to
[EMAIL PROTECTED]
[EMAIL PROTECTED]
cc
SubjectWSDL and schema include question








I am trying to run wsdl2java on a wsdl that includes an XSD in the types
section. Here is the WSDL snippet

...
In the included BigTicket.xsd there is something like:
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns="urn:BigTicket"
targetNamespace="urn:BigTicket">
 <xsd:include schemaLocation="OtherTypes.xsd"/>
 <xsd:element name="BigTicket100">
       <xsd:complexType>
           <xsd:sequence>
.....

Trying to run WSDL2Java produces the following trace:
java.io.IOException: Type {urn:BigTicket}BigTicket100 is referenced but not
defined
.
       at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(Symbol
Table.java:522)
Am I making some mistake in defining the namespace in the WSDL? If so, what
is it?


Reply via email to