axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r170350 - in /webservices/axis/trunk/java/modules: core/src/org/apache/axis/clientapi/ core/src/org/apache/axis/deployment/ core/src/org/apache/axis/engine/ core/src/org/apache/axis/receivers/ samples/test/org/apache/axis/engine/
Date Mon, 16 May 2005 10:03:56 GMT
Author: hemapani
Date: Mon May 16 03:03:54 2005
New Revision: 170350

URL: http://svn.apache.org/viewcvs?rev=170350&view=rev
Log:
fix the HandlerFailureTest

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/client.xml
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractInOutSyncMessageReceiver.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java?rev=170350&r1=170349&r2=170350&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
Mon May 16 03:03:54 2005
@@ -32,6 +32,7 @@
 import org.apache.axis.om.OMException;
 import org.apache.axis.soap.SOAPEnvelope;
 import org.apache.axis.transport.TransportReceiver;
+import org.apache.axis.transport.http.HTTPTransportReceiver;
 import org.apache.wsdl.WSDLConstants;
 
 import javax.xml.namespace.QName;
@@ -108,13 +109,18 @@
                     msgctx.getTransportIn(),
                     msgctx.getTransportOut(),
                     msgctx.getSystemContext());
+            response.setProperty(MessageContext.TRANSPORT_READER,msgctx.getProperty(MessageContext.TRANSPORT_READER))
;                   
             response.setServerSide(false);
+            response.setOperationContext(msgctx.getOperationContext());
+            response.setServiceContext(msgctx.getServiceContext());
 
-            TransportReceiver receiver = response.getTransportIn().getReciever();
+            //TODO Fix this we support only the HTTP Sync cases, so we hardcode this
+            TransportReceiver receiver = new HTTPTransportReceiver();
             receiver.invoke(response, sysContext);
             SOAPEnvelope resenvelope = response.getEnvelope();
-
-            // TODO if the resenvelope is a SOAPFault then throw an exception
+            if(resenvelope.getBody().hasFault()){
+                throw new AxisFault(resenvelope.getBody().getFault().getException());
+            }
             return response;
         } catch (OMException e) {
             throw AxisFault.makeFault(e);

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/client.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/client.xml?rev=170350&r1=170349&r2=170350&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/client.xml (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/client.xml Mon
May 16 03:03:54 2005
@@ -4,7 +4,7 @@
 
     <messageReceiver mep="INOUT" class="org.apache.axis.receivers.RawXMLINOutMessageRecevier"/>
 
-    <transportReceiver name="http">
+    <transportReceiver name="http" >
     </transportReceiver>
     <transportSender name="http" class="org.apache.axis.transport.http.HTTPTransportSender">
     </transportSender>

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java?rev=170350&r1=170349&r2=170350&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/Phase.java Mon May
16 03:03:54 2005
@@ -86,8 +86,7 @@
      * @throws AxisFault
      */
     public void invoke(MessageContext msgctx) throws AxisFault {
-        try {
-            while (indexOfHandlerToExecute < handlers.size() ) {
+            while (indexOfHandlerToExecute < handlers.size()) {
                 if(msgctx.isPaused()){
                     break;
                 }else{
@@ -103,10 +102,6 @@
                     }
                 }
             }
-        } catch (Exception e) {
-            log.info("Phase " + phaseName + " failed with the "
-                    + e.getMessage());
-        }
     }
 
     /**

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractInOutSyncMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractInOutSyncMessageReceiver.java?rev=170350&r1=170349&r2=170350&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractInOutSyncMessageReceiver.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractInOutSyncMessageReceiver.java
Mon May 16 03:03:54 2005
@@ -52,12 +52,15 @@
             new RelatesTo(
                 oldMessageInfoHeaders.getMessageId(),
                 AddressingConstants.WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE));
-
-        MessageContext resultContext = invokeBusinessLogic(messgeCtx,newmsgCtx);
+        newmsgCtx.setOperationContext(messgeCtx.getOperationContext());
+        newmsgCtx.setServiceContext(messgeCtx.getServiceContext());
+        newmsgCtx.setProperty(MessageContext.TRANSPORT_WRITER,messgeCtx.getProperty(MessageContext.TRANSPORT_WRITER));
+        
+        invokeBusinessLogic(messgeCtx,newmsgCtx);
 
         AxisEngine engine =
             new AxisEngine(
                 messgeCtx.getOperationContext().getServiceContext().getEngineContext());
-        engine.send(resultContext);
+        engine.send(newmsgCtx);
     }
 }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java?rev=170350&r1=170349&r2=170350&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
(original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
Mon May 16 03:03:54 2005
@@ -166,6 +166,7 @@
             }
             fail("the test must fail due to bad service Name");
         } catch (AxisFault e) {
+            e.printStackTrace();
             assertTrue((e.getMessage().indexOf(UtilServer.FAILURE_MESSAGE)) > 0);
             return;
         }



Mime
View raw message