-----Ursprüngliche Nachricht-----
Von: Hagai Cibulski [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 28. Oktober 2005 13:55
An: [email protected]
Betreff: RE: WSDL2Java versus Java 5It not possible to throw arrays because an array object is not an instance of the Throwable class, which is a required superclass for all throwables you may throw according to Java language rules.If you need nested exceptions you can use the "cause" property of Throwable.If you must have an array of T_Error you can define a class like:class T_Errors_Holder extends Throwable{T_Errors[] errors;//etc...}
From: Franz Fehringer [mailto:[EMAIL PROTECTED]
Sent: Fri 10/28/2005 1:39 PM
To: [email protected]
Subject: WSDL2Java versus Java 5Hello,
I have problems compiling Java sources generated with WSDL2Java.
For concreteness my setup is
WIN2KSP4 Professional
JDK 1.5.0_05
Tomcat 5.5.12
Java Axis 1.3
The WSDL i use is delivered by a customer.
The main problem preventing me from compiling the generated sources are
lines of the form
public com.pegs_pegstour.www.API.XMLSchema._1_0_1.CancelHotelBookingResponse
cancelHotelBooking(com.pegs_pegstour.www.API.XMLSchema._1_0_1.CancelHote
lBookingRequest parameters) throws java.rmi.RemoteException,
com.pegs_pegstour.www.API.XMLSchema._1_0_1.T_Error[];
The throw declaration says, that an ARRAY of T_error objects can be thrown
and this is exactly what Java 5 refuses to compile.
If i delete the brackets (T_Error instead of T_Error[]) the line compiles.
The WSDL construct leading to the problem code is of the form
<fault name="CancelHotelBookingFault" message="pgs:ErrorResponseMessage"/>
where ErrorResponseMessage is a sequence of t_Error.
Why is it not possible to throw arrays and what would be the correct way to
handle this kind of situation?
Greetings
Franz
Dr. Franz Fehringer (Dipl. Math.)
____________________________________
ISO Software Systeme
Eichendorffstrasse 29
90491 Nuremberg
Germany
Tel. : +49/(911) - 99594-0
Fax : +49/(911) - 99594-580
mailto:[EMAIL PROTECTED]
http://www.isogmbh.de
<<attachment: winmail.dat>>
