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 ke...@apache.org on 2007/11/28 18:47:02 UTC
svn commit: r599072 -
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java
Author: keithc
Date: Wed Nov 28 09:46:55 2007
New Revision: 599072
URL: http://svn.apache.org/viewvc?rev=599072&view=rev
Log:
Fixing issue with serializing OMText as documentation
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java?rev=599072&r1=599071&r2=599072&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisDescription.java Wed Nov 28 09:46:55 2007
@@ -20,6 +20,7 @@
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNode;
+import org.apache.axiom.om.OMText;
import org.apache.axis2.AxisFault;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.i18n.Messages;
@@ -145,15 +146,19 @@
public String getDocumentation() {
if (documentation != null) {
- StringWriter writer = new StringWriter();
- documentation.build();
- try {
- documentation.serialize(writer);
- } catch (XMLStreamException e) {
- log.error(e);
+ if (documentation.getType() == OMNode.TEXT_NODE) {
+ return ((OMText)documentation).getText();
+ } else {
+ StringWriter writer = new StringWriter();
+ documentation.build();
+ try {
+ documentation.serialize(writer);
+ } catch (XMLStreamException e) {
+ log.error(e);
+ }
+ writer.flush();
+ return writer.toString();
}
- writer.flush();
- return writer.toString();
}
return null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org