scheu 02/04/17 15:30:51
Modified: java/src/org/apache/axis/wsdl/fromJava Types.java
Log:
Bugzilla 8191 Fix
The writeType(Class type) method locates a Serializer and invokes the
Serializer.writeSchema method to write out the schema.
If a Serializer is not found, the code defaults to using the BeanSerializer.
This code has been changed slightly to only use the BeanSerializer if the
java class type is not Throwable. (There is no defined mapping for
types which are Throwable. Don't confuse this with the wsdl:fault mapping.)
This will fix the abend reported by Thomas.
Revision Changes Path
1.22 +6 -1 xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java
Index: Types.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- Types.java 15 Apr 2002 21:54:19 -0000 1.21
+++ Types.java 17 Apr 2002 22:30:51 -0000 1.22
@@ -358,7 +358,12 @@
factory = (SerializerFactory)defaultTM.getSerializer(type);
}
if (factory == null) {
- factory = new BeanSerializerFactory(type, getTypeQName(type));
+ // If no factory is found, try the BeanSerializerFactory if
+ // the type is not Throwable. (There is no mapping for
+ // java types that extend Throwable.)
+ if (!Throwable.class.isAssignableFrom(type)) {
+ factory = new BeanSerializerFactory(type, getTypeQName(type));
+ }
}
if (factory != null) {
ser = (Serializer)factory.getSerializerAs(Constants.AXIS_SAX);