Author: prabath
Date: Thu Jan  6 05:04:34 2011
New Revision: 1055749

URL: http://svn.apache.org/viewvc?rev=1055749&view=rev
Log:
Fix for https://issues.apache.org/jira/browse/AXIS2-4248

Modified:
    
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java?rev=1055749&r1=1055748&r2=1055749&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
 Thu Jan  6 05:04:34 2011
@@ -1,5 +1,4 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
+/*Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
  * regarding copyright ownership. The ASF licenses this file
@@ -15,7 +14,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */
+ */ 
 
 package org.apache.axis2.util;
 
@@ -355,6 +354,21 @@ public class MessageContextBuilder {
         // now add HTTP Headers
         faultContext.setProperty(HTTPConstants.HTTP_HEADERS,
                                  
processingContext.getProperty(HTTPConstants.HTTP_HEADERS));
+                               
+        // Set wsa:Action for fault message
+        // Use specified value if available
+               AxisOperation axisOperation = 
processingContext.getAxisOperation();
+               if ((axisOperation != null) && (axisOperation.getOutputAction() 
!= null)) {
+                       
faultContext.setWSAAction(axisOperation.getOutputAction());
+               } else {
+                       // If not, simply copy the request value. Almost always 
invalid.
+                       
faultContext.setWSAAction(processingContext.getWSAAction());
+               }
+                               
+               if (axisOperation != null && !(axisOperation instanceof 
InOnlyAxisOperation)){
+                                                                     
faultContext.setAxisMessage(axisOperation
+                                                   
.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE));
+            }
 
         //setting the out bound binding message
         AxisBindingMessage inboundAxisBindingMessage


Reply via email to