axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Keese <bi...@tech.beacon-it.co.jp>
Subject Re: Problem with inheritance Axis1_2 RC3
Date Fri, 04 Mar 2005 00:23:00 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">
Isn't it a bad idea to have a complexType with two elements of the same
name (but NOT representing an array)?<br>
<br>
Davanum Srinivas wrote:
<blockquote cite="mid19e0530f05030313435c30435d@mail.gmail.com"
 type="cite">
  <pre wrap="">Please open a bug report and then upload the complete wsdl file.

thanks,
dims


On Thu, 3 Mar 2005 22:32:43 +0100 (CET), Niclas Gustafsson
<a class="moz-txt-link-rfc2396E" href="mailto:niclas.gustafsson@codesense.com">&lt;niclas.gustafsson@codesense.com&gt;</a>
wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,

I'm having some trouble compiling code generated by Axis 1.2 RC3 from my
WSDL-file.

It's quite obvious what's causing the compile to fail, two arguments with
the same name (cause1) to the constructor, not really a good idea. ;)

Is this a bug or am I'm doing something really wrong here?

...

package com.webmethods.www._package.electric_soap;

public class SOAPException  extends
com.webmethods.www.exceptions.Exception  implements java.io.Serializable {
    private java.lang.String code;
    private java.lang.String actor;
    private exml.Element detail;
    private com.webmethods.www.exceptions.Throwable cause1;
    private boolean autoRethrow;

    public SOAPException() {
    }

    public SOAPException(
           java.lang.String detailMessage,
           java.lang.String stackTrace1,
           java.lang.Object cause1,
           java.lang.String code,
           java.lang.String actor,
           exml.Element detail,
           com.webmethods.www.exceptions.Throwable cause1,
           boolean autoRethrow) {
        super(
            detailMessage,
            stackTrace1,
            cause1);
        this.code = code;
        this.actor = actor;
        this.detail = detail;
        this.cause1 = cause1;
        this.autoRethrow = autoRethrow;
    }
..................................................

Axis 1.1 constructor of same class:

..................................................

    public SOAPException(
           java.lang.String _throwable_detailMessage,
           java.lang.String _throwable_stackTrace,
           java.lang.Object _throwable_cause,
           java.lang.String code,
           java.lang.String actor,
           exml.Element detail,
           com.webmethods.www.exceptions.Throwable cause,
           boolean autoRethrow) {
        super(
            _throwable_detailMessage,
            _throwable_stackTrace,
            _throwable_cause);
        this.code = code;
        this.actor = actor;
        this.detail = detail;
        this.cause = cause;
        this.autoRethrow = autoRethrow;
    }
..............

............
WSDL fragment:
   &lt;xsd:schema
targetNamespace='<a class="moz-txt-link-freetext" href="http://www.webmethods.com/package/electric.soap/">http://www.webmethods.com/package/electric.soap/</a>'&gt;
      &lt;xsd:import namespace='<a class="moz-txt-link-freetext" href="http://exml/">http://exml/</a>'/&gt;
      &lt;xsd:import namespace='<a class="moz-txt-link-freetext" href="http://www.webmethods.com/exceptions/">http://www.webmethods.com/exceptions/</a>'/&gt;
      &lt;xsd:complexType name='SOAPException'&gt;
        &lt;xsd:complexContent&gt;
          &lt;xsd:extension base='n6:exception'&gt;
            &lt;xsd:all&gt;
              &lt;xsd:element name='code' nillable='true' type='xsd:string'/&gt;
              &lt;xsd:element name='actor' nillable='true' type='xsd:string'/&gt;
              &lt;xsd:element name='detail' nillable='true' type='n7:element'/&gt;
              &lt;xsd:element name='cause' nillable='true' type='n6:throwable'/&gt;
              &lt;xsd:element name='autoRethrow' type='xsd:boolean'/&gt;
            &lt;/xsd:all&gt;
          &lt;/xsd:extension&gt;
        &lt;/xsd:complexContent&gt;
      &lt;/xsd:complexType&gt;
    &lt;/xsd:schema&gt;

...
  &lt;xsd:schema targetNamespace='<a class="moz-txt-link-freetext" href="http://www.webmethods.com/exceptions/">http://www.webmethods.com/exceptions/</a>'&gt;
      &lt;xsd:complexType name='throwable'&gt;
        &lt;xsd:all&gt;
          &lt;xsd:element name='detailMessage' type='xsd:string'
nillable='true'/&gt;
          &lt;xsd:element name='stackTrace' type='xsd:string' minOccurs='0'/&gt;
          &lt;xsd:element name='cause' type='xsd:anyType' minOccurs='0'/&gt;
        &lt;/xsd:all&gt;
      &lt;/xsd:complexType&gt;
      &lt;xsd:complexType name='exception'&gt;
        &lt;xsd:complexContent&gt;
          &lt;xsd:extension base='n6:throwable'/&gt;
        &lt;/xsd:complexContent&gt;
      &lt;/xsd:complexType&gt;
    &lt;/xsd:schema&gt;
...

Regards,

Niclas Gustafsson


    </pre>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
</body>
</html>

Mime
View raw message