ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r382373 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ core/src/org/apache/axis2/engine/ core/src/org/apache/axis2/util/
Date Thu, 02 Mar 2006 13:14:11 GMT
Author: chinthaka
Date: Thu Mar  2 05:14:07 2006
New Revision: 382373

URL: http://svn.apache.org/viewcvs?rev=382373&view=rev
Log:
Improving addressing handlers

Modified:
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java?rev=382373&r1=382372&r2=382373&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
Thu Mar  2 05:14:07 2006
@@ -122,6 +122,7 @@
                 faultInformation = new HashMap();
                 messageContext.setProperty(Constants.FAULT_INFORMATION_FOR_HEADERS, faultInformation);
             }
+
             faultInformation.put(Final.FAULT_HEADER_PROB_HEADER_QNAME, "wsa:" + addressingHeaderName);
             faultInformation.put(Final.WSA_FAULT_ACTION, Final.WSA_FAULT_ACTION);
             if (messageContext.isSOAP11()) {

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?rev=382373&r1=382372&r2=382373&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
Thu Mar  2 05:14:07 2006
@@ -151,7 +151,7 @@
         Map faultInfo = (Map) msgContext.getProperty(Constants.FAULT_INFORMATION_FOR_HEADERS);
         if (faultInfo != null) {
             String faultyHeaderQName = (String) faultInfo.get(Final.FAULT_HEADER_PROB_HEADER_QNAME);
-            if (faultyHeaderQName != null && "".equals(faultyHeaderQName)) {
+            if (faultyHeaderQName != null && !"".equals(faultyHeaderQName)) {
                 SOAPHeaderBlock faultDetail = envelope.getHeader().addHeaderBlock(Final.FAULT_HEADER_DETAIL,
addressingNamespaceObject);
                 OMElement probHeaderQName = OMAbstractFactory.getOMFactory().createOMElement(Final.FAULT_HEADER_PROB_HEADER_QNAME,
addressingNamespaceObject, faultDetail);
                 probHeaderQName.setText(faultyHeaderQName);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java?rev=382373&r1=382372&r2=382373&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
Thu Mar  2 05:14:07 2006
@@ -21,6 +21,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.addressing.RelatesTo;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
@@ -28,6 +29,7 @@
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.transport.TransportSender;
+import org.apache.axis2.util.UUIDGenerator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.commons.om.OMAbstractFactory;
@@ -150,6 +152,14 @@
         faultContext.setTransportIn(processingContext.getTransportIn());
         faultContext.setTransportOut(processingContext.getTransportOut());
 
+        faultContext.setMessageID(UUIDGenerator.getUUID());
+        faultContext.setRelatesTo(
+                new RelatesTo(
+                        processingContext.getOptions().getMessageId(),
+                        AddressingConstants.Final.WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE));
+        faultContext.setProperty(MessageContext.CHARACTER_SET_ENCODING,
+                processingContext.getProperty(MessageContext.CHARACTER_SET_ENCODING));
+
         // register the fault message context
         if (processingContext.getAxisOperation() != null && processingContext.getOperationContext()
!= null)
         {
@@ -289,7 +299,7 @@
                     uri = uri == null || "".equals(uri) ? Constants.AXIS2_NAMESPACE_URI :
uri;
                     soapFaultCode = prefix + ":" + faultCodeQName.getLocalPart();
                     fault.declareNamespace(uri, prefix);
-                }else{
+                } else {
                     soapFaultCode = faultCodeQName.getLocalPart();
                 }
             }
@@ -309,7 +319,7 @@
             message = fault.getReason().getSOAPText().getText();
         } else if (soapException != null) {
             message = soapException.getMessage();
-        } else if (exception instanceof AxisFault) {
+        } else if (((exception = e) instanceof AxisFault || (exception = e.getCause()) instanceof
AxisFault)){
             message = ((AxisFault) exception).getReason();
             message = message != null && "".equals(message) ? message : e.getMessage();
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java?rev=382373&r1=382372&r2=382373&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java Thu Mar
 2 05:14:07 2006
@@ -86,7 +86,7 @@
             newmsgCtx.setReplyTo(replyToEPR);
         }
 
-        newmsgCtx.setFaultTo(oldOptions.getFaultTo());
+        newmsgCtx.setFaultTo(oldOptions.getTo());
         newmsgCtx.setFrom(oldOptions.getTo());
         newmsgCtx.setRelatesTo(
                 new RelatesTo(



Mime
View raw message