i have seen this before. if i remember i had the
import statements inside a <xsd:schema> definition.
like
<xsd:schema>
<..imports
I had to take out the <xsd:schema>  to get wsdl2java to work
vijay

"Ferguson, Hamish" <[EMAIL PROTECTED]> wrote:
Hello,

I am trying to include schema's into my wsdl but am running into a few problems and was hoping someone out there has the solution.

I'll outline what I'm trying to do.

1) Take an axis generated wsdl and parse it through a java app I have written that adds application specific constraint's to
the defined in the section.

2) Extract and remove the modified schema's from the section and write them to individual .xsd files

3) add import's in the wsdl file referring to the schema's I extracted.

4) add the myWSDL.wsdl entry into myWSDD.wsdd file so that AXIS uses my wsdl file.

Now for the problem part:

When I try to run wsdl2java I get the following exception:

[java] java.io.IOException: Element {http://mywebservice.sabre.com/cruise}CategoryAvailability is referenced but not defined.
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:527)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393)
[java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
[java] at java.lang.Thread.run(Thread.java:534)


I think Axis only imports schema's when a element in the wsdl has a namespace that has NOT already been declared and matches the namespace defined in the




TO





where MYIMPL a different namespace from impl, but MYIMPL ns is the same as the ns of the schema I am trying to import.
This gets me past the first exception, but, of course I end up with all sorts of binding errors, but it kind of does lead me to believe that if a namespace is already defined ( i.e impl="http://mywebservice.sabre.com/cruise" ) and you try to import something with the same namespace from an .xsd file AXIS won't load it.


I have tried this on both 1.1 and 1.2alpha


I have included my wsdl file and the main schema file that has the definitions where I am seeing the problem.

If anyone can provide some insight and/or advice, I'd appreciate it.

Thanks,

Hamish.



HERE IS THE WSDL





xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://mywebservice.sabre.com/cruise"
xmlns:intf="http://mywebservice.sabre.com/cruise"
xmlns:tns1="urn:displaybooking:datatypes:communications:cruise:sabre:com"
xmlns:tns10="urn:cabinavailability:datatypes:communications:cruise:sabre:com"
xmlns:tns11="urn:sailingavailability:datatypes:communications:cruise:sabre:com"
xmlns:tns12="urn:cabinhold:datatypes:communications:cruise:sabre:com"
xmlns:tns13="http://exceptions.communications.cruise.sabre.com"
xmlns:tns14="http://www.w3.org/1999/XMLSchema"
xmlns:tns2="urn:createrevisebooking:datatypes:communications:cruise:sabre:com"
xmlns:tns3="urn:rateoptionavailability:datatypes:communications:cruise:sabre:com"
xmlns:tns4="urn:statementandpricing:datatypes:communications:cruise:sabre:com"
xmlns:tns5="urn:cancelbooking:datatypes:communications:cruise:sabre:com"
xmlns:tns6="urn:diningavailability:datatypes:communications:cruise:sabre:com"
xmlns:tns7="urn:datatypes:communications:cruise:sabre:com"
xmlns:tns8="urn:transportationavailability:datatypes:communications:cruise:sabre:com"
xmlns:tns9="urn:categoryavailability:datatypes:communications:cruise:sabre:com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">






























































































































































































































































































HERE IS cruiseapi.xsd





=== message truncated ===

Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam

Reply via email to