You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by du...@apache.org on 2001/05/21 19:41:36 UTC
cvs commit: xml-soap/java/src/org/apache/soap/rpc RPCMessage.java
duftler 01/05/21 10:41:35
Modified: java/src/org/apache/soap/rpc RPCMessage.java
Log:
Cleaned up handling of "Response" suffix on tag name.
Revision Changes Path
1.15 +6 -15 xml-soap/java/src/org/apache/soap/rpc/RPCMessage.java
Index: RPCMessage.java
===================================================================
RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/rpc/RPCMessage.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- RPCMessage.java 2001/04/22 01:01:02 1.14
+++ RPCMessage.java 2001/05/21 17:41:29 1.15
@@ -392,27 +392,18 @@
// encodingStyle attribute is set.
smr.setDefaultEncodingStyle(Constants.NS_URI_SOAP_ENC);
+ methodName = tagName;
+
/*
Sanity check: the name of the method element should be the
methodName for a call and should be methodName+"Response"
for a response. Note: currently no way to know the methodName
other than from the tag name.
*/
- if (isResponse) {
- if (tagName.endsWith(RPCConstants.RESPONSE_SUFFIX)) {
- // Strip "Response" from end of tagName to derive methodName.
- methodName = tagName.substring(0, tagName.length() - 8);
- } else {
- methodName = tagName;
- // throw new IllegalArgumentException("Element name '" +
- // tagName +
- // "' must end with '" +
- // RPCConstants.RESPONSE_SUFFIX +
- // "'.");
- }
- } else {
- methodName = tagName;
- }
+ if (isResponse && methodName.endsWith(RPCConstants.RESPONSE_SUFFIX)) {
+ // Strip "Response" from end of tagName to derive methodName.
+ methodName = methodName.substring(0, methodName.length() - 8);
+ }
Element tempEl = DOMUtils.getFirstChildElement(root);