ias 2004/03/11 04:22:32
Modified: java/src/org/apache/axis/client Call.java
Log:
Added invoke(Message) to simplify SOAPConnectionImpl's usage of invoke(SOAPEnvelope).
Revision Changes Path
1.218 +35 -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.217
retrieving revision 1.218
diff -u -r1.217 -r1.218
--- Call.java 5 Mar 2004 05:22:01 -0000 1.217
+++ Call.java 11 Mar 2004 12:22:32 -0000 1.218
@@ -1785,6 +1785,41 @@
/************************************************************************/
/**
+ * Invoke the service with a custom Message.
+ * This method simplifies invoke(SOAPEnvelope).
+ * <p>
+ * Note: Not part of JAX-RPC specification.
+ *
+ * @param msg a Message to send
+ * @throws AxisFault if there is any failure
+ */
+ public SOAPEnvelope invoke(Message msg) throws AxisFault {
+ try {
+ setRequestMessage( msg );
+ invoke();
+ msg = msgContext.getResponseMessage();
+ if (msg == null) {
+ if (msgContext.isPropertyTrue(FAULT_ON_NO_RESPONSE, false)) {
+ throw new AxisFault(Messages.getMessage("nullResponse00"));
+ } else {
+ return null;
+ }
+ }
+ SOAPEnvelope res = null;
+ res = msg.getSOAPEnvelope();
+ return res;
+ }
+ catch (Exception exp) {
+ if (exp instanceof AxisFault) {
+ throw (AxisFault) exp ;
+ }
+ entLog.debug(Messages.getMessage("toAxisFault00"), exp);
+ throw new AxisFault(
+ Messages.getMessage("errorInvoking00", "\n" + exp));
+ }
+ }
+
+ /**
* Invoke the service with a custom SOAPEnvelope.
* <p>
* Note: Not part of JAX-RPC specification.
|