You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2004/03/02 17:07:33 UTC
DO NOT REPLY [Bug 27372] New: -
attempting to use incompatible return type - method getCause()
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27372>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27372
attempting to use incompatible return type - method getCause()
Summary: attempting to use incompatible return type - method
getCause()
Product: Axis
Version: 1.1
Platform: All
OS/Version: Other
Status: NEW
Severity: Blocker
Priority: Other
Component: WSDL processing
AssignedTo: axis-dev@ws.apache.org
ReportedBy: cwl@free.fr
environment -------------------------
Axis 1.1
java full version "1.4.1_01-b01"
-------------------------------------
I have the following error when I want to compile the code generated by
WSDL2Java :
D:\WLC\projet\DGI\Service_alertes\_build\client\src\alerte\portailfiscal\impot
s\gouv\fr\AlerteFault.java:33: getCause() in
alerte.portailfiscal.impots.gouv.fr.AlerteFault cannot override getCause() in
java.rmi.RemoteException; attempting to use incompatible return type
found : java.lang.Object
required: java.lang.Throwable
public java.lang.Object getCause() {
^
1 error
-------------------------------------------------
This code deployed to Axis server ( I used just the Axis sample
NoSuchEmployeeFault.java and change the class name ) :
public class AlerteFault extends RemoteException implements Serializable {
private String _info;
public AlerteFault() {
}
public AlerteFault(String info) {
_info = info;
}
public String getInfo() {
return _info;
}
public void setInfo(String info) {
_info =info;
}
}
---------------------------------------------------------
generates from axis server the following wsdl :
<complexType name="AlerteFault">
<sequence>
<element name="cause" nillable=3D"true" type="xsd:anyType"/>
<element name="info" nillable=3D"true" type="xsd:string"/>
<element name="message" nillable=3D"true" type="xsd:string"/>
</sequence>
</complexType>
So it adds the element name "cause" with anyType, since JDK 1.4 there is a new
method "throwable getCause()" into
java.rmi.RemoteException which is extend by org.apache.axis.AxisFault.
How can I resolve this bug ?
thanx