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 di...@apache.org on 2002/07/10 19:33:03 UTC
cvs commit: xml-axis/java/src/javax/xml/soap SOAPElement.java
dims 2002/07/10 10:33:03
Modified: java/src/org/apache/axis/utils axisNLS.properties
java/src/org/apache/axis/message MessageElement.java
java/src/javax/xml/soap SOAPElement.java
Log:
- Update setEncodingStyle for SAAJ compliance.
Revision Changes Path
1.25 +1 -0 xml-axis/java/src/org/apache/axis/utils/axisNLS.properties
Index: axisNLS.properties
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/axisNLS.properties,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- axisNLS.properties 9 Jul 2002 15:17:31 -0000 1.24
+++ axisNLS.properties 10 Jul 2002 17:33:03 -0000 1.25
@@ -744,6 +744,7 @@
javaIOException01=java.io.IOException: {0}
illegalAccessException00=IllegalAccessException:
illegalArgumentException00=IllegalArgumentException:
+illegalArgumentException01=IllegalArgumentException: {0}
invocationTargetException00=InvocationTargetException:
instantiationException00=InstantiationException:
malformedURLException00=MalformedURLException:
1.112 +15 -3 xml-axis/java/src/org/apache/axis/message/MessageElement.java
Index: MessageElement.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/MessageElement.java,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- MessageElement.java 10 Jul 2002 15:39:14 -0000 1.111
+++ MessageElement.java 10 Jul 2002 17:33:03 -0000 1.112
@@ -333,13 +333,25 @@
}
/**
- * Set the encoding style. Calling this means you are absolutely
- * setting it to SOMETHING valid. The semantics of a null value,
+ * Sets the encoding style for this <CODE>SOAPElement</CODE>
+ * object to one specified. The semantics of a null value,
* as above in getEncodingStyle() are to just use the parent's value,
* but null here means set to "".
+ *
+ * @param encodingStyle a <CODE>String</CODE>
+ * giving the encoding style
+ * @throws java.lang.IllegalArgumentException if
+ * there was a problem in the encoding style being set.
+ * @see #getEncodingStyle() getEncodingStyle()
*/
public void setEncodingStyle(String encodingStyle) throws SOAPException {
- if (encodingStyle == null) encodingStyle = "";
+ if (encodingStyle == null) {
+ encodingStyle = "";
+ }
+
+ if(!encodingStyle.equals("") && !Constants.isSOAP_ENC(encodingStyle))
+ throw new IllegalArgumentException(JavaUtils.getMessage("illegalArgumentException01",encodingStyle));
+
this.encodingStyle = encodingStyle;
// Wherever we set the encoding style, map the SOAP-ENC prefix
1.4 +1 -1 xml-axis/java/src/javax/xml/soap/SOAPElement.java
Index: SOAPElement.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/javax/xml/soap/SOAPElement.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SOAPElement.java 16 Jun 2002 22:19:49 -0000 1.3
+++ SOAPElement.java 10 Jul 2002 17:33:03 -0000 1.4
@@ -289,7 +289,7 @@
* object to one specified.
* @param encodingStyle a <CODE>String</CODE>
* giving the encoding style
- * @throws SOAPException if
+ * @throws java.lang.IllegalArgumentException if
* there was a problem in the encoding style being set.
* @see #getEncodingStyle() getEncodingStyle()
*/