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 du...@apache.org on 2007/03/01 15:10:57 UTC

svn commit: r513338 - /webservices/axis/trunk/java/src/org/apache/axis/client/Call.java

Author: dug
Date: Thu Mar  1 06:10:56 2007
New Revision: 513338

URL: http://svn.apache.org/viewvc?view=rev&rev=513338
Log:
Add support for sending an AxisFault in the Body of a new msg instead of just
as a response

Modified:
    webservices/axis/trunk/java/src/org/apache/axis/client/Call.java

Modified: webservices/axis/trunk/java/src/org/apache/axis/client/Call.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/java/src/org/apache/axis/client/Call.java?view=diff&rev=513338&r1=513337&r2=513338
==============================================================================
--- webservices/axis/trunk/java/src/org/apache/axis/client/Call.java (original)
+++ webservices/axis/trunk/java/src/org/apache/axis/client/Call.java Thu Mar  1 06:10:56 2007
@@ -1852,6 +1852,21 @@
         }
     }
 
+    public void invoke( AxisFault af ) throws java.rmi.RemoteException {
+      try {
+        SOAPFault      sf   = new SOAPFault( af );
+        // make sure we pick-up the right namespaces
+        MessageContext mc   = MessageContext.getCurrentContext();
+        AxisEngine.setCurrentMessageContext( msgContext );
+        org.w3c.dom.Element elem = sf.getAsDOM();
+        AxisEngine.setCurrentMessageContext( mc );
+        invoke( new Object[] { new SOAPBodyElement( elem ) } );
+      }
+      catch( Exception exp ) {
+        throw new JAXRPCException( exp );
+      }
+    }
+
     /**
      * Invokes the operation associated with this Call object using the passed
      * in parameters as the arguments to the method.  This will return
@@ -1889,6 +1904,17 @@
         try {
             msgContext.setIsOneWay( true );
             invoke( method, args );
+        } catch( Exception exp ) {
+            throw new JAXRPCException( exp.toString() );
+        } finally {
+            msgContext.setIsOneWay( false );
+        }
+    }
+
+    public void invokeOneWay( AxisFault af ) {
+        try {
+            msgContext.setIsOneWay( true );
+            invoke( af );
         } catch( Exception exp ) {
             throw new JAXRPCException( exp.toString() );
         } finally {



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org