axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terry Mueller <te...@permeance.com.au>
Subject Re: [Fwd: Re: Problems with WSDL2Java upgrading from Axis 1.2 to Axis 1.4]
Date Tue, 30 Jan 2007 14:17:59 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Century Gothic">I have solved one of the problems (i.e.
arrays being generated in the "throws" clause) by adding a "-w" to the
wsdl2java command line options.<br>
<br>
I have attached an example of a broken source file with an invalid
constructor super call because the superclass is java.lang.Object! I
think the problem is caused when an element extends a simple type with
an attribute. Is that what you mean by an "anonymous complex type"?<br>
<br>
The following XSD reflects the attached broken code:<br>
<br>
</font><font face="Century Gothic">&nbsp;&nbsp;&nbsp; &lt;xsd:complexType
name="t_Warning"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:sequence&gt;<br>
...<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;xsd:element name="Description"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &lt;xsd:complexType&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:simpleContent&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;xsd:extension base="t_ErrorDescription"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &lt;xsd:attribute name="LanguageCode"
type="t_Language" use="required"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;/xsd:extension&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:simpleContent&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &lt;/xsd:complexType&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;/xsd:element&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;xsd:element name="Source" type="t_ErrorSource"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:sequence&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/xsd:complexType&gt;</font><br>
<font face="Century Gothic">...<br>
</font><font face="Century Gothic">&nbsp;&nbsp;&nbsp; &lt;xsd:simpleType
name="t_ErrorDescription"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:restriction base="xsd:string"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;xsd:maxLength value="10000"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:restriction&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/xsd:simpleType&gt;<br>
...<br>
&nbsp;&nbsp;&nbsp; &lt;xsd:simpleType name="t_Language"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;xsd:restriction base="xsd:string"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;xsd:maxLength value="40"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/xsd:restriction&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/xsd:simpleType&gt;<br>
</font><font face="Century Gothic"><br>
This XSD generate code fine with Axis 1.2 but I haven't thoroughly
tested a client...<br>
</font>
<div class="moz-signature"><br>
Regards,
<br>
Terry
</div>
<br>
<br>
Franz Fehringer wrote:
<blockquote cite="mid45BF3F13.1070708@isogmbh.de" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Hello,<br>
  <br>
Out of curiosity:<br>
Your WSDL contains multiple portTypes.<br>
Is this supported with AXIS1JAVA?<br>
Btw i work also with PegsTour (Singular Interface pertaining to PT
version 2.12.2), but i use the C++ implementation of Axis.<br>
This one definitely cannot cope with multiple portTypes (i think even
for Axis2 this is a TODO yet, not quite sure however).<br>
Furthermore Axis1 (both Java and C++) has problems with anonymous
complexTypes (this is much improved in AXISCPP nightly), so i am
slightly surprised to hear that you could successfully use Axis1 1.2<br>
  <br>
Greetings<br>
  <br>
Franz<br>
  <br>
  <br>
Cantrell, Andrew schrieb:
  <blockquote
 cite="midA46870C44EC8074095A6E5B74F5F3DCB014A7E90@kewexh01.emea-aspac.ad.pegs.com"
 type="cite">
    <meta http-equiv="Content-Type" content="text/html; ">
    <meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
    <style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:blue;
	text-decoration:underline;}
p
	{mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman";}
pre
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";}
span.EmailStyle21
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
	{page:Section1;}
-->
  </style>
    <div class="Section1">
    <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">OK &#8211; have
attached a version that I
think complies with your suggestions however we are still getting
compile errors<o:p></o:p></span></font></p>
    <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;"><o:p>&nbsp;</o:p></span></font></p>
    <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">Regards<o:p></o:p></span></font></p>
    <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;"><o:p>&nbsp;</o:p></span></font></p>
    <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">Andrew<o:p></o:p></span></font></p>
    <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;"><o:p>&nbsp;</o:p></span></font></p>
    <div>
    <div class="MsoNormal" style="text-align: center;" align="center"><font
 face="Times New Roman" size="3"><span style="font-size: 12pt;"
 lang="EN-US">
    <hr tabindex="-1" align="center" size="2" width="100%"></span></font></div>
    </div>
    <p class="MsoNormal"><b><font face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma; font-weight: bold;"
 lang="EN-US">From:</span></font></b><font face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma;" lang="EN-US">
Anne Thomas Manes [<a class="moz-txt-link-freetext"
 href="mailto:atmanes@gmail.com">mailto:atmanes@gmail.com</a>] <br>
    <br>
    </span></font></p>
    <p class="MsoNormal" style="margin-bottom: 12pt;"><font
 face="Times New Roman" size="3"><span style="font-size: 12pt;">Okay
... just for
starters, your import statement is in error. <br>
    <br>
You are trying to import a schema definition (PegsTour.xsd) using
&lt;wsdl:import&gt;. &lt;wsdl:import&gt; may be used only to import
WSDL
descriptions, not schemas. Axis 1.2 was lax and permitted you to do
this, but
Axis 1.4 is more strict. <br>
    <br>
You must add a &lt;wsdl:types&gt; section to the document, define a
schema, and
use &lt;xsd:import&gt; or &lt;xsd:include&gt; to import/include the
schema. You
use &lt;xsd:import&gt; to import a schema in a different namespace, and
you use
&lt;xsd:include&gt; to include multiple schema files that define the
same
namespace. <br>
    <br>
Next, the PegsTour.xsd schema references a ton of components that are
not
defined in the schema file. My guess is that they are defined in all
the other
schema files that you supplied, but you don't &lt;xsd:include&gt; them
into the
schema. Therefore, you can't reference them. You must add an
&lt;xsd:include&gt; statement for each of the other schema files. I
haven't
looked at the other schema files, but if any of them reference
components
described in other schema files, you must also add &lt;xsd:include&gt;
statements to those schemas. <br>
    <br>
Regards,<br>
Anne<br>
    <br>
    <o:p></o:p></span></font></p>
    <div>
    <p class="MsoNormal"><span class="gmailquote"><font
 face="Times New Roman" size="3"><span style="font-size: 12pt;">On
1/29/07, <b><span style="font-weight: bold;">Cantrell,
Andrew</span></b> &lt;<a href="mailto:Andrew.Cantrell@pegs.com">Andrew.Cantrell@pegs.com</a>&gt;
wrote:</span></font></span><o:p></o:p></p>
    <div bgcolor="white" link="blue" vlink="blue">
    <div>
    <div>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">Please post the WSDL.</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&nbsp;</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">On 1/29/07, Terry Mueller <a
 href="mailto:terry@permeance.com.au" target="_blank"><o:p></o:p></a></span></font></pre>
    <pre><span class="MsoHyperlink"><u><font color="blue"
 face="Courier New" size="2"><span style="font-size: 10pt;"><a
 href="mailto:terry@permeance.com.au" target="_blank">&lt;terry@permeance.com.au&gt;</a></span></font></u></span><font
 color="black"><span style="color: black;"> wrote:</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; I have tested WSDL2Java with our WSDL
using Axis 1.2 without any<o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; problems. When I upgrade to Axis 1.4 (drop
in new jars), the same</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;"><o:p>&nbsp;</o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; command generates code with compile errors.
There are three basic</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; compilation problems: (1) in some constructors
of simple types there is<o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; call to super(foo,bar) that doesn't exist
(2) the "throws" clauses</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;"><o:p>&nbsp;</o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; declaration contains an array and (3)
the class in the "throws" clause</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; does not extend <o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">java.lang.Exception.</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt;&nbsp;</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;"><o:p>&nbsp;</o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt;&nbsp;</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; I was having a play with Lisa test tool
from <a
 href="http://www.itko.com/" target="_blank"><o:p></o:p></a></span></font></pre>
    <pre><span class="MsoHyperlink"><u><font color="blue"
 face="Courier New" size="2"><span style="font-size: 10pt;"><a
 href="http://www.itko.com/" target="_blank">http://www.itko.com/</a></span></font></u></span><font
 color="black"><span style="color: black;"> which</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; uses Axis 1.4 so I can't upgrade to Axis
2 yet.</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;"><o:p>&nbsp;</o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt;&nbsp;</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt;&nbsp;</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;"><o:p>&nbsp;</o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; Any ideas?</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt;&nbsp;</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;"><o:p>&nbsp;</o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; ---------------------------------------------------------------------</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; To unsubscribe, e-mail: <a
 href="mailto:axis-user-unsubscribe@ws.apache.org" target="_blank"><o:p></o:p></a></span></font></pre>
    <pre><span class="MsoHyperlink"><u><font color="blue"
 face="Courier New" size="2"><span style="font-size: 10pt;"><a
 href="mailto:axis-user-unsubscribe@ws.apache.org" target="_blank">axis-user-unsubscribe@ws.apache.org</a></span></font></u></span><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt; For additional commands, e-mail: <a
 href="mailto:axis-user-help@ws.apache.org" target="_blank"><o:p></o:p></a></span></font></pre>
    <pre><span class="MsoHyperlink"><u><font color="blue"
 face="Courier New" size="2"><span style="font-size: 10pt;"><a
 href="mailto:axis-user-help@ws.apache.org" target="_blank">axis-user-help@ws.apache.org</a></span></font></u></span><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt;&nbsp;</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;"><o:p>&nbsp;</o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&gt;&nbsp;</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&nbsp;</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">---------------------------------------------------------------------<o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">To unsubscribe, e-mail: <a
 href="mailto:axis-user-unsubscribe@ws.apache.org" target="_blank"><o:p></o:p></a></span></font></pre>
    <pre><span class="MsoHyperlink"><u><font color="blue"
 face="Courier New" size="2"><span style="font-size: 10pt;"><a
 href="mailto:axis-user-unsubscribe@ws.apache.org" target="_blank">axis-user-unsubscribe@ws.apache.org</a></span></font></u></span><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">For additional commands, e-mail: <a
 href="mailto:axis-user-help@ws.apache.org" target="_blank"><o:p></o:p></a></span></font></pre>
    <pre><span class="MsoHyperlink"><u><font color="blue"
 face="Courier New" size="2"><span style="font-size: 10pt;"><a
 href="mailto:axis-user-help@ws.apache.org" target="_blank">axis-user-help@ws.apache.org</a></span></font></u></span><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&nbsp;</span></font><o:p></o:p></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;"><o:p>&nbsp;</o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt; color: black;">&nbsp;</span></font><o:p></o:p></pre>
    <p><font color="black" face="Times New Roman" size="3"><span
 style="font-size: 12pt; color: black;">&nbsp;</span></font><o:p></o:p></p>
    </div>
    <div>
    <p><font color="black" face="Times New Roman" size="3"><span
 style="font-size: 12pt; color: black;"></span>-- <br>
    <br>
Regards, <br>
Terry </font><o:p></o:p></p>
    </div>
    </div>
    </div>
    <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;"><br>
---------------------------------------------------------------------<br>
To unsubscribe, e-mail: <a
 href="mailto:axis-user-unsubscribe@ws.apache.org">axis-user-unsubscribe@ws.apache.org
    </a><br>
For additional commands, e-mail: <a
 href="mailto:axis-user-help@ws.apache.org">axis-user-help@ws.apache.org</a><br>
    <br>
    <br clear="all">
    <o:p></o:p></span></font></p>
    </div>
    <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;"><o:p>&nbsp;</o:p></span></font></p>
    </div>
    <pre wrap=""><hr size="4" width="90%">
---------------------------------------------------------------------
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated"
 href="mailto:axis-user-unsubscribe@ws.apache.org">axis-user-unsubscribe@ws.apache.org</a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated"
 href="mailto:axis-user-help@ws.apache.org">axis-user-help@ws.apache.org</a></pre>
  </blockquote>
  <br>
  <pre wrap="">---------------------------------------------------------------------
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:axis-user-unsubscribe@ws.apache.org">axis-user-unsubscribe@ws.apache.org</a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:axis-user-help@ws.apache.org">axis-user-help@ws.apache.org</a></pre>
</blockquote>
</body>
</html>

Mime
View raw message