cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egl...@apache.org
Subject svn commit: r554669 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/ws/addressing/ rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/
Date Mon, 09 Jul 2007 14:58:42 GMT
Author: eglynn
Date: Mon Jul  9 07:58:40 2007
New Revision: 554669

URL: http://svn.apache.org/viewvc?view=rev&rev=554669
Log:
Encoding wsa:FaultTo and wsa:From headers.


Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/AddressingProperties.java
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/AddressingPropertiesImpl.java
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/AddressingProperties.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/AddressingProperties.java?view=diff&rev=554669&r1=554668&r2=554669
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/AddressingProperties.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/AddressingProperties.java
Mon Jul  9 07:58:40 2007
@@ -43,6 +43,18 @@
     void setTo(EndpointReferenceType epr);
 
     /**
+     * Accessor for the <b>From</b> property.
+     * @return current value of From property
+     */
+    EndpointReferenceType getFrom();
+
+    /**
+     * Mutator for the <b>From</b> property.
+     * @param epr new value for From property
+     */
+    void setFrom(EndpointReferenceType epr);
+
+    /**
      * Accessor for the <b>MessageID</b> property.
      * @return current value of MessageID property
      */

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/AddressingPropertiesImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/AddressingPropertiesImpl.java?view=diff&rev=554669&r1=554668&r2=554669
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/AddressingPropertiesImpl.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/AddressingPropertiesImpl.java
Mon Jul  9 07:58:40 2007
@@ -24,6 +24,7 @@
  */
 public class AddressingPropertiesImpl implements AddressingProperties {
     private EndpointReferenceType to;
+    private EndpointReferenceType from;
     private AttributedURIType messageID;
     private EndpointReferenceType replyTo;
     private EndpointReferenceType faultTo;
@@ -65,6 +66,22 @@
      */
     public void setTo(EndpointReferenceType epr) {
         to = epr;
+    }
+
+    /**
+     * Accessor for the <b>From</b> property.
+     * @return current value of From property
+     */
+    public EndpointReferenceType getFrom() {
+        return from;
+    }
+
+    /**
+     * Mutator for the <b>From</b> property.
+     * @param epr new value for From property
+     */
+    public void setFrom(EndpointReferenceType epr) {
+        from = epr;
     }
 
     /**

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java?view=diff&rev=554669&r1=554668&r2=554669
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
Mon Jul  9 07:58:40 2007
@@ -386,7 +386,11 @@
                         replyTo = backChannel.getAddress();
                     }
                 }
-                if (replyTo == null || isOneway) {
+                if (replyTo == null
+                    || (isOneway
+                        && (replyTo.getAddress() == null
+                            || !Names.WSA_NONE_ADDRESS.equals(
+                                    replyTo.getAddress().getValue())))) {
                     AttributedURIType address =
                         ContextUtils.getAttributedURI(isOneway
                                                       ? Names.WSA_NONE_ADDRESS
@@ -397,8 +401,12 @@
                 }
                 maps.setReplyTo(replyTo);
             }
-            if (!isOneway) {
-                // REVISIT FaultTo if cached by transport in message
+
+            // FaultTo
+            if (maps.getFaultTo() == null) {
+                maps.setFaultTo(maps.getReplyTo());
+            } else if (maps.getFaultTo().getAddress() == null) {
+                maps.setFaultTo(null);
             }
         } else {
             // add response-specific MAPs

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java?view=diff&rev=554669&r1=554668&r2=554669
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
Mon Jul  9 07:58:40 2007
@@ -168,6 +168,12 @@
                                 hdr, 
                                 marshaller);
                 encodeAsExposed(maps.getNamespaceURI(),
+                                maps.getFrom(), 
+                                Names.WSA_FROM_NAME,
+                                EndpointReferenceType.class,  
+                                hdr, 
+                                marshaller);
+                encodeAsExposed(maps.getNamespaceURI(),
                                 maps.getReplyTo(), 
                                 Names.WSA_REPLYTO_NAME, 
                                 EndpointReferenceType.class,



Mime
View raw message