axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anne Thomas Manes <a...@manes.net>
Subject RE: Exception using wsdl2java using a wsdl with imported schema
Date Fri, 19 Mar 2004 19:30:40 GMT
<html>
<body>
Your WSDL needs to look like this:<br><br>
&lt;wsdl:definitions
targetNamespace=&quot;http://mywebservice.sabre.com/cruise&quot; <br>
&nbsp;xmlns:apachesoap=&quot;<a href="http://xml.apache.org/xml-soap" eudora="autourl">http://xml.apache.org/xml-soap</a>&quot;
<br>
&nbsp;xmlns:impl=&quot;<a href="http://mywebservice.sabre.com/cruise" eudora="autourl">http://mywebservice.sabre.com/cruise</a>&quot;
<br>
&nbsp;xmlns:intf=&quot;<a href="http://mywebservice.sabre.com/cruise" eudora="autourl">http://mywebservice.sabre.com/cruise</a>&quot;
<br>
&nbsp;xmlns:tns1=&quot;urn:displaybooking:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:tns10=&quot;urn:cabinavailability:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:tns11=&quot;urn:sailingavailability:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:tns12=&quot;urn:cabinhold:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:tns13=&quot;<a href="http://exceptions.communications.cruise.sabre.com/"
eudora="autourl">http://exceptions.communications.cruise.sabre.com</a>&quot;
<br>
&nbsp;xmlns:tns14=&quot;<a href="http://www.w3.org/1999/XMLSchema" eudora="autourl">http://www.w3.org/1999/XMLSchema</a>&quot;
<br>
&nbsp;xmlns:tns2=&quot;urn:createrevisebooking:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:tns3=&quot;urn:rateoptionavailability:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:tns4=&quot;urn:statementandpricing:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:tns5=&quot;urn:cancelbooking:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:tns6=&quot;urn:diningavailability:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:tns7=&quot;urn:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:tns8=&quot;urn:transportationavailability:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:tns9=&quot;urn:categoryavailability:datatypes:communications:cruise:sabre:com&quot;
<br>
&nbsp;xmlns:wsdl=&quot;<a href="http://schemas.xmlsoap.org/wsdl/" eudora="autourl">http://schemas.xmlsoap.org/wsdl/</a>&quot;
<br>
&nbsp;xmlns:wsdlsoap=&quot;<a href="http://schemas.xmlsoap.org/wsdl/soap/" eudora="autourl">http://schemas.xmlsoap.org/wsdl/soap/</a>&quot;
<br>
&nbsp;xmlns:xsd=&quot;<a href="http://www.w3.org/2001/XMLSchema" eudora="autourl">http://www.w3.org/2001/XMLSchema</a>&quot;&gt;<br><br>
&lt;wsdl:types&gt;<br>
&lt;xsd:schema
targetNamespace=&quot;<a href="http://mywebservice.sabre.com/cruise" eudora="autourl">http://mywebservice.sabre.com/cruise</a>&quot;&gt;&nbsp;
<br>
&lt;xsd:import location=&quot;cabinavailability.xsd&quot;
namespace=&quot;urn:cabinavailability:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;xsd:import location=&quot;cabinhold.xsd&quot;
namespace=&quot;urn:cabinhold:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;xsd:import location=&quot;cancelbooking.xsd&quot;
namespace=&quot;urn:cancelbooking:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;xsd:import location=&quot;categoryavailability.xsd&quot;
namespace=&quot;urn:categoryavailability:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;xsd:import location=&quot;control.xsd&quot;
namespace=&quot;urn:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;xsd:import location=&quot;createrevisebooking.xsd&quot;
namespace=&quot;urn:createrevisebooking:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;xsd:import location=&quot;cruiseapi.xsd&quot;
namespace=&quot;<a href="http://exceptions.communications.cruise.sabre.com/" eudora="autourl">http://exceptions.communications.cruise.sabre.com</a>&quot;/&gt;<br>
&lt;xsd:import location=&quot;diningavailability.xsd&quot;
namespace=&quot;urn:diningavailability:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;xsd:import location=&quot;displaybooking.xsd&quot;
namespace=&quot;urn:displaybooking:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;xsd:import location=&quot;exceptions.xsd&quot;
namespace=&quot;<a href="http://exceptions.communications.cruise.sabre.com/" eudora="autourl">http://exceptions.communications.cruise.sabre.com</a>&quot;/&gt;<br>
&lt;xsd:import location=&quot;rateoptionavailability.xsd&quot;&nbsp;
namespace=&quot;urn:rateoptionavailability:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;xsd:import location=&quot;sailingavailability.xsd&quot;
namespace=&quot;urn:sailingavailability:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;xsd:import location=&quot;statementandpricing.xsd&quot;
namespace=&quot;urn:statementandpricing:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;xsd:import location=&quot;transportationavailability.xsd&quot;&nbsp;
namespace=&quot;urn:transportationavailability:datatypes:communications:cruise:sabre:com&quot;/&gt;<br>
&lt;/xsd:schema&gt;<br>
&lt;/wsdl:types&gt;<br><br>
&lt;wsdl:message name=&quot;SailingAvailabilityRequest&quot;&gt;<br>
&nbsp; &lt;wsdl:part element=&quot;tns11:SailingAvailability&quot;
name=&quot;parameters&quot;/&gt; <br>
&nbsp; &lt;/wsdl:message&gt;<br>
&lt;wsdl:message 
name=&quot;RateOptionAvailabilityResponse&quot;&gt;<br>
&nbsp; &lt;wsdl:part
element=&quot;tns3:RateOptionAvailabilityResponse&quot;
name=&quot;parameters&quot;/&gt; <br>
&nbsp; &lt;/wsdl:message&gt;<br>
&lt;wsdl:message
name=&quot;TransportationAvailabilityRequest&quot;&gt;<br>
&nbsp; &lt;wsdl:part element=&quot;tns8:TransportationAvailability&quot;
name=&quot;parameters&quot;/&gt; <br>
&nbsp; &lt;/wsdl:message&gt;<br>
&lt;wsdl:message name=&quot;DisplayBookingResponse&quot;&gt;<br>
&nbsp; &lt;wsdl:part element=&quot;tns1:DisplayBookingResponse&quot;
name=&quot;parameters&quot;/&gt; <br>
&nbsp; &lt;/wsdl:message&gt;<br>
&lt;wsdl:message name=&quot;CabinAvailabilityResponse&quot;&gt;<br>
&nbsp; &lt;wsdl:part element=&quot;tns10:CabinAvailabilityResponse&quot;
name=&quot;parameters&quot;/&gt; <br>
&nbsp; &lt;/wsdl:message&gt;<br>
&lt;wsdl:message name=&quot;CabinHoldResponse&quot;&gt;<br>
&nbsp; &lt;wsdl:part element=&quot;tns12:CabinHoldResponse&quot;
name=&quot;parameters&quot;/&gt; <br>
&nbsp; &lt;/wsdl:message&gt;<br>
&lt;wsdl:message name=&quot;CancelBookingResponse&quot;&gt;<br>
&nbsp; &lt;wsdl:part element=&quot;tns5:CancelBookingResponse&quot;
name=&quot;parameters&quot;/&gt; <br>
&nbsp; &lt;/wsdl:message&gt;<br>
&lt;wsdl:message name=&quot;CreateReviseBookingResponse&quot;&gt;<br>
&nbsp; &lt;wsdl:part element=&quot;tns2:CreateReviseBookingResponse&quot;
name=&quot;parameters&quot;/&gt; <br>
&nbsp; &lt;/wsdl:message&gt;<br>
&lt;wsdl:message
name=&quot;TransportationAvailabilityResponse&quot;&gt;<br>
&nbsp; &lt;wsdl:part
element=&quot;tns8:TransportationAvailabilityResponse&quot;
name=&quot;parameters&quot;/&gt; <br>
&nbsp; &lt;/wsdl:message&gt;<br>
&lt;wsdl:message name=&quot;DiningAvailabilityRequest&quot;&gt;<br>
&nbsp; &lt;wsdl:part element=&quot;tns6:DiningAvailability&quot;
name=&quot;parameters&quot;/&gt; <br>
&nbsp; &lt;/wsdl:message&gt;<br>
&lt;wsdl:message name=&quot;CancelBookingRequest&quot;&gt;<br>
&nbsp; &lt;wsdl:part element=&quot;tns5:CancelBooking&quot;
name=&quot;parameters&quot;/&gt; <br>
&nbsp; &lt;/wsdl:message&gt;<br><br>
etc...<br><br>
<br><br>
At 02:27 PM 3/19/2004, you wrote:<br>
<blockquote type=cite class=cite cite><font face="arial" size=2 color="#0000FF">Vijay,
<br>
Thanks for responding to me email. <br>
</font>&nbsp;<br>
<font face="arial" size=2 color="#0000FF">I'm a little unsure of what you
mean here.&nbsp; My imported Schemas are of the form &lt;schema&gt; not
&lt;xsd:schema&gt;&nbsp; ( I probably should have prefixed them with xsd
) .&nbsp; When you say you took out &lt;xsd:schema&gt; what did you
replace it with?&nbsp; After all &lt;xsd:schema&gt; is the root node of
my schema files.<br>
</font>&nbsp;<br>
<font face="arial" size=2 color="#0000FF">Hamish<br>
</font>
<dl>
<dd><font face="tahoma" size=2>-----Original Message-----<br>

<dd>From:</b> sreekantan, vijay
[<a href="mailto:vijayakumars@yahoo.com" eudora="autourl">mailto:vijayakumars@yahoo.com</a>]<br>

<dd>Sent:</b> Friday, March 19, 2004 11:17 AM<br>

<dd>To:</b> axis-user@ws.apache.org<br>

<dd>Subject:</b> Re: Exception using wsdl2java using a wsdl with imported
schema<br><br>
</font>
<dd>i have seen this before. if i remember i had the<br>

<dd>import statements inside a &lt;xsd:schema&gt; definition.<br>

<dd>like<br>

<dd>&lt;xsd:schema&gt; <br>

<dd>&lt;..imports<br>

<dd>I had to take out the &lt;xsd:schema&gt;&nbsp; to get wsdl2java to
work<br>

<dd>vijay<br><br>

<dd>&quot;Ferguson, Hamish&quot;
&lt;Hamish.Ferguson@sabre-holdings.com&gt;</i></b> wrote:<br>

<dd>Hello, <br><br>

<dd>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.<br><br>

<dd>I'll outline what I'm trying to do.<br><br>

<dd>1) Take an axis generated wsdl and parse it through a java app I have
written that adds application specific constraint's to<br>

<dd>the defined in the section.<br><br>

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

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

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

<dd>Now for the problem part:<br><br>

<dd>When I try to run wsdl2java I get the following exception:<br><br>

<dd>[java] java.io.IOException: Element
{<a href="http://mywebservice.sabre.com/cruise" eudora="autourl">http://mywebservice.sabre.com/cruise</a>}CategoryAvailability
is r! eferenced but not defined.<br>

<dd>[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:527)<br>

<dd>[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422)<br>

<dd>[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408)<br>

<dd>[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393)<br>

<dd>[java] at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)<br>

<dd>[java] at java.lang.Thread.run(Thread.java:534)<br><br>
<br>

<dd>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 <br><br>
<br><br>
<br>

<dd>TO<br><br>
<br><br>
<br><br>

<dd>where MYIMPL a dif! ferent namespace from impl, but MYIMPL ns is the
same as the ns of the schema I am trying to import.<br>

<dd>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=&quot;<a href="http://mywebservice.sabre.com/cruise" eudora="autourl">http://mywebservice.sabre.com/cruise</a>&quot;
) and you try to import something with the same namespace from an .xsd
file AXIS won't load it.<br><br>
<br>

<dd>I have tried this on both 1.1 and 1.2alpha<br><br>
<br>

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

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

<dd>Thanks, <br><br>

<dd>Hamish.<br><br>
<br><br>

<dd>HERE IS THE WSDL<br><br>
<br><br>
<br>

<dd>&lt;?xml version=&quot;1.0&quot; 
encoding=&quot;UTF-8&quot;?&gt;<br>

<dd>xmlns:apachesoap=&quot;<a href="http://xml.apache.org/xml-soap" eudora="autourl">http://xml.apache.org/xml-soap</a>&quot;
<br>

<dd>xmlns:impl=&quot;<a href="http://mywebservice.sabre.com/cruise" eudora="autourl">http://mywebservice.sabre.com/cruise</a>&quot;
<br>

<dd>xmlns:intf=&quot;<a href="http://mywebservice.sabre.com/cruise" eudora="autourl">http://mywebservice.sabre.com/cruise</a>&quot;
<br>

<dd>xmlns:tns1=&quot;urn:displaybooking:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:tns10=&quot;urn:cabinavailability:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:tns11=&quot;urn:sailingavailability:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:tns12=&quot;urn:cabinhold:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:tns13=&quot;<a href="http://exceptions.communications.cruise.sabre.com/"
eudora="autourl">http://exceptions.communications.cruise.sabre.com</a>&quot;
<br>

<dd>xmlns:tns14=&quot;<a href="http://www.w3.org/1999/XMLSchema" eudora="autourl">http://www.w3.org/1999/XMLSchema</a>&quot;
<br>

<dd>xmlns:tns2=&quot;urn:createrevisebooking:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:tns3=&quot;urn:rateoptionavailability:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:tns4=&quot;urn:statementandpricing:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:tns5=&quot;urn:cancelbooking:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:tns6=&quot;urn:diningavailability:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:tns7=&quot;urn:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:tns8=&quot;urn:transportationavailability:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:tns9=&quot;urn:categoryavailability:datatypes:communications:cruise:sabre:com&quot;
<br>

<dd>xmlns:wsdl=&quot;<a href="http://schemas.xmlsoap.org/wsdl/" eudora="autourl">http://schemas.xmlsoap.org/wsdl/</a>&quot;
<br>

<dd>xmlns:wsdlsoap=&quot;<a href="http://schemas.xmlsoap.org/wsdl/soap/" eudora="autourl">http://schemas.xmlsoap.org/wsdl/soap/</a>&quot;
<br>

<dd>xmlns:xsd=&quot;<a href="http://www.w3.org/2001/XMLSchema" eudora="autourl">http://www.w3.org/2001/XMLSchema</a>&quot;&gt;<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br>

<dd>HERE IS cruiseapi.xsd<br><br>
<br>

<dd>&lt;?xml version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot;?&gt;<br><br>
<br>

<dd>=== message truncated ===<br><br>

</dl><font face="arial" size=2>Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/mailtag_us/*http://mail.yahoo.com">Yahoo!
Mail</a></b> - More reliable, more storage, less spam<br>
</font></blockquote>
<x-sigsep><p></x-sigsep>
~~~~~~~~~~~~~~~~~~<br>
Anne Thomas Manes<br>
VP &amp; Research Director<br>
Burton Group</body>
</html>


Mime
View raw message