cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1159482 - in /cxf/trunk: rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
Date Fri, 19 Aug 2011 02:25:54 GMT
Author: ema
Date: Fri Aug 19 02:25:54 2011
New Revision: 1159482

URL: http://svn.apache.org/viewvc?rev=1159482&view=rev
Log:
[CXF-3740]:WSA handler have to throw WebServiceException on client side if addressing is required
but not found in the message

Modified:
    cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java

Modified: cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java?rev=1159482&r1=1159481&r2=1159482&view=diff
==============================================================================
--- cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java (original)
+++ cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java Fri
Aug 19 02:25:54 2011
@@ -33,6 +33,7 @@ import java.util.logging.Logger;
 import javax.wsdl.extensions.ExtensibilityElement;
 import javax.xml.namespace.QName;
 import javax.xml.ws.WebFault;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.soap.SoapBindingConstants;
@@ -616,7 +617,7 @@ public class MAPAggregator extends Abstr
                 }
                 if (missingWsaHeader) {
                     String reason = BUNDLE.getString("MISSING_ACTION_MESSAGE");
-                    throw new SoapFault(reason, new QName(Names.WSA_NAMESPACE_NAME,
+                    throw new WebServiceException(reason + new QName(Names.WSA_NAMESPACE_NAME,
                                                           Names.HEADER_REQUIRED_NAME));
                 }
             }

Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java?rev=1159482&r1=1159481&r2=1159482&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
(original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
Fri Aug 19 02:25:54 2011
@@ -28,6 +28,7 @@ import javax.xml.soap.MessageFactory;
 import javax.xml.soap.SOAPMessage;
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Dispatch;
+import javax.xml.ws.WebServiceException;
 import javax.xml.ws.soap.AddressingFeature;
 
 import org.apache.cxf.systest.ws.AbstractWSATestBase;
@@ -129,6 +130,7 @@ public class WSADisableTest extends Abst
             port.addNumbers(1, 2);
             fail("Expected missing WSA header exception");
         } catch (Exception e) {
+            assertTrue("expected WebServiceException", e instanceof WebServiceException);
             String expected = "A required header representing a Message Addressing"
                               + " Property is not present";
             assertTrue("Caught unexpected exception : " + e.getMessage(),



Mime
View raw message