dims 2003/03/27 06:07:42
Modified: java/src/org/apache/axis/wsdl/fromJava Types.java
Log:
Fix for Bug 18409 - Throwable not mapped correctly
Notes:
- If we print a message saying that we are mapping a class to xml schema anyType,
then we better do it as well :)
Revision Changes Path
1.72 +8 -4 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.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- Types.java 22 Feb 2003 16:49:15 -0000 1.71
+++ Types.java 27 Mar 2003 14:07:42 -0000 1.72
@@ -716,7 +716,9 @@
qName = getTypeQName(type);
}
- makeTypeElement(type, qName, null);
+ if(!makeTypeElement(type, qName, null)) {
+ return null;
+ }
return getQNameString(qName);
}
@@ -1246,9 +1248,10 @@
* which should either receive a type="" attribute decoration
* (for named types) or a child element defining an anonymous
* type
+ * @return true if the type was already present or was added, false if there
was a problem
* @throws AxisFault
*/
- private void makeTypeElement(Class type,
+ private boolean makeTypeElement(Class type,
QName qName,
Element containingElement) throws AxisFault {
// Get a corresponding QName if one is not provided
@@ -1272,7 +1275,7 @@
if (!addToTypesList(qName)) {
if (containingElement != null)
containingElement.setAttribute("type", getQNameString(qName));
- return;
+ return true;
}
// look up the serializer in the TypeMappingRegistry
@@ -1292,7 +1295,7 @@
} else if (isBeanCompatible(type, true)) {
factory = new BeanSerializerFactory(type, qName);
} else {
- return;
+ return false;
}
}
@@ -1330,5 +1333,6 @@
if (containingElement != null)
containingElement.setAttribute("type", getQNameString(qName));
}
+ return true;
}
}