You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by gd...@apache.org on 2007/03/16 05:50:10 UTC

svn commit: r518864 - /webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java

Author: gdaniels
Date: Thu Mar 15 21:50:09 2007
New Revision: 518864

URL: http://svn.apache.org/viewvc?view=rev&rev=518864
Log:
Try this test the other way - it appears to be sending a MU=true header to a service with no Handlers set up to process it.  So it SHOULD be failing with an MU fault.

Trying to figure out why integration module isn't building for me, but in the meanwhile this will hopefully fix the continuum build.

Modified:
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java?view=diff&rev=518864&r1=518863&r2=518864
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java Thu Mar 15 21:50:09 2007
@@ -18,7 +18,6 @@
 
 // todo
 
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import junit.framework.Test;
 import org.apache.axiom.om.OMAbstractFactory;
@@ -35,7 +34,6 @@
 import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.context.*;
 import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.engine.Echo;
 import org.apache.axis2.engine.util.TestConstants;
 import org.apache.axis2.integration.TestingUtils;
@@ -47,8 +45,6 @@
 
     private AxisService clientService;
 
-    private boolean finish = false;
-
     public SoapProcessingModelTest() {
         super(SoapProcessingModelTest.class.getName());
     }
@@ -74,8 +70,8 @@
         UtilServer.unDeployService(serviceName);
     }
 
-    public void sendMessageWithHeader(SOAPEnvelope envelope) throws AxisFault {
-        ServiceClient serviceClient = null;
+    public void sendMessageWithHeader(SOAPEnvelope envelope) throws Exception {
+        ServiceClient serviceClient;
 
         try {
             ConfigurationContext configContext = Utils
@@ -97,12 +93,12 @@
             opClient.setOptions(options);
             opClient.execute(true);
 
-        } catch (Exception e) {
-            e.printStackTrace();
-            fail("Exception Occurred !! ." + e.getMessage());
-            throw new AxisFault(e);
-        } finally {
+        } catch (AxisFault fault) {
+            // This should be a MustUnderstand fault
+            assertEquals(fault.getFaultCode(), SOAP12Constants.QNAME_MU_FAULTCODE);
+            return;
         }
+        fail("MU header was processed");
     }
 
     public void testSendingMustUnderstandWithNextRole() throws Exception {
@@ -118,6 +114,5 @@
         OMElement payload = TestingUtils.createDummyOMElement();
         envelope.getBody().addChild(payload);
         sendMessageWithHeader(envelope);
-
     }
 }



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