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]
|
|
To
|
[EMAIL PROTECTED]
|
cc
|
|
Subject
|
WSDL 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
<wsdl:definitions
targetNamespace="HelloWorldDescription"
xmlns:impl="HelloWorldDescription"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:MyDataTypes="urn:BigTicket">
<wsdl:types>
<xsd:schema targetNamespace="urn:BigTicket">
<xsd:include schemaLocation="BigTicket.xsd" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="sayHello2Request">
<wsdl:part name="in0" type="MyDataTypes:BigTicket100"/>
</wsdl:message>
..............
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?
Thanks for any help.
Shantanu Sen