ias 2004/05/09 02:55:43
Modified: java/src/org/apache/axis/client Call.java
Log:
Fix getOutputParams and getOutputValues to throw JAXRPCException in case that they are called
prior to invoke.
Revision Changes Path
1.223 +13 -0 ws-axis/java/src/org/apache/axis/client/Call.java
Index: Call.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/client/Call.java,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -r1.222 -r1.223
--- Call.java 3 May 2004 20:04:09 -0000 1.222
+++ Call.java 9 May 2004 09:55:43 -0000 1.223
@@ -276,6 +276,9 @@
*/
protected java.util.Vector attachmentParts = new java.util.Vector();
+ /** This is false when invoke() is called. */
+ private boolean isNeverInvoked = true;
+
/************************************************************************/
/* Start of core JAX-RPC stuff */
/************************************************************************/
@@ -2573,6 +2576,8 @@
log.debug("Enter: Call::invoke()");
}
+ isNeverInvoked = false;
+
Message reqMsg = null ;
SOAPEnvelope reqEnv = null ;
@@ -2780,6 +2785,10 @@
*/
public Map getOutputParams()
{
+ if (isNeverInvoked) {
+ throw new JAXRPCException(
+ Messages.getMessage("outputParamsUnavailable"));
+ }
return this.outParams;
}
@@ -2795,6 +2804,10 @@
* before any invoke method has been called.
*/
public List getOutputValues() {
+ if (isNeverInvoked) {
+ throw new JAXRPCException(
+ Messages.getMessage("outputParamsUnavailable"));
+ }
return outParamsList;
}
|