axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arne M. Degenring" <a...@degenring.de>
Subject FW: Bug with AxisFault and WSDL generation
Date Sun, 07 Jul 2002 18:49:43 GMT
I've sent this mail to axis-dev on Friday, but the message did not come
through to the list. Ist axis-dev moderated?

I would greatly appreciate any hints.


-----Original Message-----
From: Arne M. Degenring [mailto:arne@degenring.de] 
Sent: Friday, July 05, 2002 11:19 AM
To: 'axis-dev@xml.apache.org'
Subject: FW: Bug with AxisFault and WSDL generation


Hi Axis Developers,

there hasn't been a response on axis-user. I think it surely is a bug
because Axis is not able to generate a proxy (with WSDL2Java) out of a
WSDL definition created by itself.

Do you have any hints regarding exception handling and setting my own
SOAP fault codes?

Thanks for your great job,

Arne


-----Original Message-----
From: Arne M. Degenring [mailto:arne@degenring.de] 
Sent: Tuesday, July 02, 2002 9:57 PM
To: axis-user@xml.apache.org
Subject: Bug with AxisFault and WSDL generation


Hi everybody,

I'm trying to use my own SOAP fault codes instead of the default
"Server.userException". My idea was to let my Web Service class throw a
AxisFault. I can set the faultcode etc. within the AxisFault
constructor. I've set up such a web service that does nothing but throw
a new AxisFault:

---
public class TestWS {
  public void test() throws AxisFault {
     throw new AxisFault(new QName("http://my.ns.com", "myCode"),
               "myString", "", new Element[0]);
  }
}
---

When I access the test() method with a SOAP client (e.g. .NET web
service studio) I get back a perfect SOAP response message containing a
SOAP Fault block according to the spec.

BUT: The WSDL that is auto-generated by Axis contains a definition of
AxisFault in the targetNamespace "http://axis.apache.org". Tomcat's
system-out sais "The class java.rmi.RemoteException is defined in a java
or javax package and cannot be converted into an xml schema type. An xml
Schema anyType will be used to define this class in the wsdl file."

AND: When I try to create a client using WSDL2Java I get a
"java.io.IOException: Type {http://axis.apache.org}AxisFault is
referenced but not defined."

------> Axis is not able to create a proxy out of a WSDL definition
created by itself. This surely is a bug, ain't it?

Is there a better way to set my own SOAP fault code?

Thanks for your hints,

Arne


Mime
View raw message