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 gd...@apache.org on 2001/11/09 19:18:51 UTC
cvs commit: xml-axis/java/src/org/apache/axis/message RPCElement.java
gdaniels 01/11/09 10:18:51
Modified: java/src/org/apache/axis/message RPCElement.java
Log:
Send encoding style.
Revision Changes Path
1.25 +20 -0 xml-axis/java/src/org/apache/axis/message/RPCElement.java
Index: RPCElement.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/RPCElement.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- RPCElement.java 2001/10/30 14:19:29 1.24
+++ RPCElement.java 2001/11/09 18:18:51 1.25
@@ -57,7 +57,9 @@
import org.apache.axis.encoding.DeserializationContext;
import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.Constants;
import org.xml.sax.Attributes;
+import org.xml.sax.helpers.AttributesImpl;
import javax.xml.rpc.namespace.QName;
import java.util.Vector;
@@ -156,6 +158,24 @@
protected void outputImpl(SerializationContext context) throws Exception
{
+ if (attributes == null)
+ attributes = new AttributesImpl();
+
+ /**
+ * Because we're an RPCElement, we can pretty well guess that
+ * we're RPC encoded. Default to section 5 encoding.
+ *
+ * !!! TODO : make this overridable with other encoding styles!
+ *
+ */
+ String prefix = context.getPrefixForURI(Constants.URI_SOAP_ENC,
+ "SOAP-ENV");
+ attributes.addAttribute(Constants.URI_SOAP_ENV,
+ Constants.ATTR_ENCODING_STYLE,
+ prefix + ":" + Constants.ATTR_ENCODING_STYLE,
+ "CDATA",
+ Constants.URI_SOAP_ENC);
+
context.startElement(new QName(namespaceURI,name),attributes);
for (int i = 0; i < params.size(); i++) {
((RPCParam)params.elementAt(i)).serialize(context);