ws-addressing-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject svn commit: r370165 - in /webservices/addressing/trunk/src/org/apache/axis/message/addressing: Constants.java handler/AddressingHandler.java
Date Wed, 18 Jan 2006 15:10:27 GMT
Author: gdaniels
Date: Wed Jan 18 07:10:23 2006
New Revision: 370165

URL: http://svn.apache.org/viewcvs?rev=370165&view=rev
Log:
Enable a MessageContext property to set the response action, so that service/
codegen code can use it.

Don't throw faults that were generated as a result of message forwarding back
up the original transport channel.  Log 'em instead.

Modified:
    webservices/addressing/trunk/src/org/apache/axis/message/addressing/Constants.java
    webservices/addressing/trunk/src/org/apache/axis/message/addressing/handler/AddressingHandler.java

Modified: webservices/addressing/trunk/src/org/apache/axis/message/addressing/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/addressing/trunk/src/org/apache/axis/message/addressing/Constants.java?rev=370165&r1=370164&r2=370165&view=diff
==============================================================================
--- webservices/addressing/trunk/src/org/apache/axis/message/addressing/Constants.java (original)
+++ webservices/addressing/trunk/src/org/apache/axis/message/addressing/Constants.java Wed
Jan 18 07:10:23 2006
@@ -213,6 +213,14 @@
         "addressing.sendReplyTo";
 
     /**
+     * MessageContext property name for setting the response action.
+     * Will only work if an action is not already included in the response
+     * AddressingHeaders (see AddressingHandler.java).
+     */
+    public static final String ENV_ADDRESSING_RESP_ACTION =
+            "addressing.responseAction";
+
+    /**
      * Field QNAME_ACTION
      */
     public static final String WSDL_ATTRIB_ACTION = "Action";

Modified: webservices/addressing/trunk/src/org/apache/axis/message/addressing/handler/AddressingHandler.java
URL: http://svn.apache.org/viewcvs/webservices/addressing/trunk/src/org/apache/axis/message/addressing/handler/AddressingHandler.java?rev=370165&r1=370164&r2=370165&view=diff
==============================================================================
--- webservices/addressing/trunk/src/org/apache/axis/message/addressing/handler/AddressingHandler.java
(original)
+++ webservices/addressing/trunk/src/org/apache/axis/message/addressing/handler/AddressingHandler.java
Wed Jan 18 07:10:23 2006
@@ -482,12 +482,20 @@
         // set Action
         Action action = resHeaders.getAction();
         if (action == null) {
-            // not set - try request headers
-            action = reqHeaders.getAction();
-            if (action != null) {
-                URI actionURI = new org.apache.axis.types.URI(action.toString()+"Response",
allowNonSpecificActions);
-                resHeaders.setAction(new Action(new URI(actionURI)));
-             }
+            String respAction =
+                    msgContext.getStrProp(Constants.ENV_ADDRESSING_RESP_ACTION);
+            if (respAction == null) {
+                // not set - try request headers
+                action = reqHeaders.getAction();
+                if (action != null) {
+                    URI actionURI = new org.apache.axis.types.URI(
+                            action.toString() + "Response",
+                            allowNonSpecificActions);
+                    resHeaders.setAction(new Action(actionURI));
+                }
+            } else {
+                resHeaders.setAction(new Action(new URI(respAction)));
+            }
         }
 
         if (resHeaders.getFrom() == null && reqHeaders.getFrom() != null) {
@@ -555,8 +563,17 @@
         c.setTargetEndpointAddress(address.toString());
         c.setRequestMessage(msg);
         c.setProperty(Constants.ENV_ADDRESSING_REQUEST_HEADERS, headers);
+        c.setOperationStyle(msgContext.getOperationStyle());
+        c.setOperationUse(msgContext.getOperationUse());
         configureCall(c, msgContext);
-        c.invoke();
+        try {
+            c.invoke();
+        } catch (AxisFault axisFault) {
+            // This fault shouldn't necessarily become the response of
+            // the original interaction, should it?  Should we be doing
+            // this on a separate thread?
+            log.error(axisFault);
+        }
     }
     
     /**



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


Mime
View raw message