You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2005/02/04 04:42:45 UTC
cvs commit: ws-axis/java/src/org/apache/axis/i18n resource.properties
dims 2005/02/03 19:42:45
Modified: java/src/org/apache/axis/message MessageElement.java
RPCParam.java
java/src/org/apache/axis/i18n resource.properties
Log:
minor changes to how text is treated (patches from Jonas team)
Revision Changes Path
1.193 +1 -1 ws-axis/java/src/org/apache/axis/message/MessageElement.java
Index: MessageElement.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/MessageElement.java,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -r1.192 -r1.193
--- MessageElement.java 4 Feb 2005 00:31:06 -0000 1.192
+++ MessageElement.java 4 Feb 2005 03:42:45 -0000 1.193
@@ -1385,7 +1385,7 @@
public SOAPElement addTextNode(String s) throws SOAPException {
try {
Text text = getOwnerDocument().createTextNode(s);
- appendChild(text);
+ ((org.apache.axis.message.Text)text).setParentElement(this);
return this;
} catch (ClassCastException e) {
throw new SOAPException(e);
1.63 +28 -5 ws-axis/java/src/org/apache/axis/message/RPCParam.java
Index: RPCParam.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/RPCParam.java,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- RPCParam.java 6 Dec 2004 18:24:50 -0000 1.62
+++ RPCParam.java 4 Feb 2005 03:42:45 -0000 1.63
@@ -23,6 +23,9 @@
import org.apache.commons.logging.Log;
import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
@@ -67,20 +70,26 @@
*/
public RPCParam(String name, Object value)
{
- super(new QName("", name));
- this.value = value;
+ this(new QName("", name), value);
}
public RPCParam(QName qname, Object value)
{
super(qname);
- this.value = value;
+ if (value instanceof java.lang.String) {
+ try {
+ this.addTextNode((String) value);
+ } catch (SOAPException e) {
+ throw new RuntimeException(Messages.getMessage("cannotCreateTextNode00"));
+ }
+ } else {
+ this.value = value;
+ }
}
public RPCParam(String namespace, String name, Object value)
{
- super(new QName(namespace, name));
- this.value = value;
+ this(new QName(namespace, name), value);
}
public void setRPCCall(RPCElement call)
@@ -210,4 +219,18 @@
return getValueDOM();
}
+ /**
+ * @see javax.xml.soap.SOAPElement#addTextNode(java.lang.String)
+ */
+ public SOAPElement addTextNode(String s) throws SOAPException {
+ value = s;
+ return super.addTextNode(s);
+ }
+ /**
+ * @see javax.xml.soap.Node#setValue(java.lang.String)
+ */
+ public void setValue(String value) {
+ this.value = value;
+ super.setValue(value);
+ }
}
1.110 +2 -1 ws-axis/java/src/org/apache/axis/i18n/resource.properties
Index: resource.properties
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/i18n/resource.properties,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -r1.109 -r1.110
--- resource.properties 3 Feb 2005 21:57:33 -0000 1.109
+++ resource.properties 4 Feb 2005 03:42:45 -0000 1.110
@@ -1265,4 +1265,5 @@
noDefaultTypeMapping00=Default TypeMapping has not been specified
noOverloadedOperations=WS-I Basic Profile disallows overloaded operations. Multiple definitions for operation ''{0}''!
-invocationArgumentsModified00=Invocation arguments were modified
\ No newline at end of file
+invocationArgumentsModified00=Invocation arguments were modified
+cannotCreateTextNode00=Exception creating text node
\ No newline at end of file