You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/01/02 22:39:31 UTC

svn commit: r608239 - in /incubator/cxf/branches/2.0.x-fixes: ./ api/src/main/java/org/apache/cxf/ws/addressing/ common/common/src/main/java/org/apache/cxf/common/util/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/bindings...

Author: dkulp
Date: Wed Jan  2 13:39:27 2008
New Revision: 608239

URL: http://svn.apache.org/viewvc?rev=608239&view=rev
Log:
Merged revisions 606109 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r606109 | mmao | 2007-12-21 01:04:12 -0500 (Fri, 21 Dec 2007) | 6 lines
  
  CXF-1324
   * Configure the SOAPAction URI through the JAXWS context
   * LoggingOut log the protocol headers and contentType
   * Using the SOAPAction Constants instead of hard code string 
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/ws/addressing/JAXWSAConstants.java
    incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java
    incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java
    incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionOutInterceptor.java
    incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java
    incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java
    incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingMessage.java
    incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ContextPropertiesMapping.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
    incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
    incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/Names.java
    incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
    incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/ws/addressing/JAXWSAConstants.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/ws/addressing/JAXWSAConstants.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/ws/addressing/JAXWSAConstants.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/ws/addressing/JAXWSAConstants.java Wed Jan  2 13:39:27 2008
@@ -20,11 +20,35 @@
 
 package org.apache.cxf.ws.addressing;
 
+import javax.xml.namespace.QName;
+
 
 /**
  * A container for WS-Addressing constants.
  */
 public final class JAXWSAConstants {
+    
+    public static final String WSAW_PREFIX = "wsaw";
+    public static final String NS_WSAW = "http://www.w3.org/2006/05/addressing/wsdl";
+
+    public static final QName WSAW_ACTION_QNAME = new QName(NS_WSAW,  "Action");
+    
+    public static final QName WSAW_USINGADDRESSING_QNAME = new QName(NS_WSAW, "UsingAddressing");
+    
+    public static final String NS_WSA = "http://www.w3.org/2005/08/addressing";
+    public static final String WSA_PREFIX = "wsa";
+    
+    public static final String WSA_ERF_NAME = "EndpointReference";
+    public static final String WSA_REFERENCEPARAMETERS_NAME = "ReferenceParameters";
+    public static final String WSA_METADATA_NAME = "Metadata";
+    public static final String WSA_ADDRESS_NAME = "Address";
+        
+    public static final String WSAW_SERVICENAME_NAME = "ServiceName";
+    public static final String WSAW_INTERFACE_NAME = "InterfaceName";
+    public static final String WSAW_ENDPOINT_NAME = "EndpointName";    
+
+
+    
 
     /**
      * Well-known Property names for AddressingProperties in BindingProvider

Modified: incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java Wed Jan  2 13:39:27 2008
@@ -222,4 +222,15 @@
         chars[0] = Character.toUpperCase(chars[0]);
         return new String(chars);
     }
+    
+    public static String uncapitalize(String str) {
+        int strLen = str.length();
+        if (str == null || strLen == 0) {
+            return str;
+        }
+        return new StringBuffer(strLen)
+            .append(Character.toLowerCase(str.charAt(0)))
+            .append(str.substring(1))
+            .toString();
+    }    
 }

Modified: incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java Wed Jan  2 13:39:27 2008
@@ -25,6 +25,7 @@
 
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.binding.soap.Soap12;
+import org.apache.cxf.binding.soap.SoapConstants;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.model.SoapOperationInfo;
 import org.apache.cxf.endpoint.Endpoint;
@@ -48,7 +49,7 @@
         if (message.getVersion() instanceof Soap11) {
             Map<String, List<String>> headers = CastUtils.cast((Map)message.get(Message.PROTOCOL_HEADERS));
             if (headers != null) {
-                List<String> sa = headers.get("SOAPAction");
+                List<String> sa = headers.get(SoapConstants.SOAP_ACTION);
                 if (sa != null && sa.size() > 0) {
                     String action = sa.get(0);
                     if (action.startsWith("\"")) {

Modified: incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionOutInterceptor.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionOutInterceptor.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionOutInterceptor.java Wed Jan  2 13:39:27 2008
@@ -67,8 +67,8 @@
                 message.put(Message.PROTOCOL_HEADERS, reqHeaders);
             }
             
-            if (!reqHeaders.containsKey("SOAPAction")) {            
-                reqHeaders.put("SOAPAction", Collections.singletonList(action));
+            if (!reqHeaders.containsKey(SoapConstants.SOAP_ACTION)) {            
+                reqHeaders.put(SoapConstants.SOAP_ACTION, Collections.singletonList(action));
             }
         } else if (message.getVersion() instanceof Soap12 && !"\"\"".equals(action)) {
             String ct = (String) message.get(Message.CONTENT_TYPE);

Modified: incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java Wed Jan  2 13:39:27 2008
@@ -56,7 +56,7 @@
         (new SoapActionOutInterceptor()).handleMessage(soapMessage);
         Map<String, List<String>> reqHeaders = CastUtils.cast((Map)soapMessage.get(Message.PROTOCOL_HEADERS));
         assertNotNull(reqHeaders);
-        assertEquals("\"\"", reqHeaders.get("SOAPAction").get(0));
+        assertEquals("\"\"", reqHeaders.get(SoapConstants.SOAP_ACTION).get(0));
 
         sb.setSoapVersion(Soap12.getInstance());
         soapMessage.clear();

Modified: incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java Wed Jan  2 13:39:27 2008
@@ -285,6 +285,7 @@
 
         final String ct = headers.getHeader("Content-Type", null);
         DataSource source = new AttachmentDataSource(ct, new DelegatingInputStream(partStream));
+        //DataSource source = new AttachmentDataSource(null, new DelegatingInputStream(partStream));
         att.setDataHandler(new DataHandler(source));
 
         for (Enumeration<?> e = headers.getAllHeaders(); e.hasMoreElements();) {

Modified: incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingMessage.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingMessage.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingMessage.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingMessage.java Wed Jan  2 13:39:27 2008
@@ -59,7 +59,9 @@
         buffer.append(encoding);
         buffer.append("\nHeaders: ");
         buffer.append(header);
+        buffer.append("\nMessages: ");
         buffer.append(message);
+        buffer.append("\nPayload: ");
         buffer.append(payload);
         buffer.append("\n--------------------------------------");
         return buffer.toString();

Modified: incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java Wed Jan  2 13:39:27 2008
@@ -74,11 +74,17 @@
             // Write the output while caching it for the log message
             final CacheAndWriteOutputStream newOut = new CacheAndWriteOutputStream(os);
             message.setContent(OutputStream.class, newOut);
-            newOut.registerCallback(new LoggingCallback());
+            newOut.registerCallback(new LoggingCallback(message));
         }
     }
 
     class LoggingCallback implements CachedOutputStreamCallback {
+        
+        private final Message message;
+        
+        public LoggingCallback(final Message msg) {
+            this.message = msg;
+        }
 
         public void onFlush(CachedOutputStream cos) {  
             
@@ -86,6 +92,18 @@
         
         public void onClose(CachedOutputStream cos) {
             final LoggingMessage buffer = new LoggingMessage("Outbound Message\n---------------------------");
+            
+            String encoding = (String)message.get(Message.ENCODING);
+
+            if (encoding != null) {
+                buffer.getEncoding().append(encoding);
+            }            
+            
+            Object headers = message.get(Message.PROTOCOL_HEADERS);
+
+            if (headers != null) {
+                buffer.getHeader().append(headers);
+            }
 
             if (cos.getTempFile() == null) {
                 //buffer.append("Outbound Message:\n");

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ContextPropertiesMapping.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ContextPropertiesMapping.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ContextPropertiesMapping.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ContextPropertiesMapping.java Wed Jan  2 13:39:27 2008
@@ -31,6 +31,7 @@
 import javax.xml.ws.handler.MessageContext;
 import javax.xml.ws.handler.MessageContext.Scope;
 
+import org.apache.cxf.binding.soap.SoapConstants;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.configuration.security.AuthorizationPolicy;
 import org.apache.cxf.endpoint.Endpoint;
@@ -91,6 +92,8 @@
                          "HTTP.RESPONSE");
         jaxws2cxfMap.put(MessageContext.SERVLET_CONTEXT, 
                         "HTTP.CONTEXT");
+        
+        jaxws2cxfMap.put(BindingProvider.SOAPACTION_URI_PROPERTY, SoapConstants.SOAP_ACTION);
     }
     
     private ContextPropertiesMapping() {

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java Wed Jan  2 13:39:27 2008
@@ -68,6 +68,7 @@
         this(bus, s, ei, null);
     }
 
+
     public JaxWsEndpointImpl(Bus bus, Service s, EndpointInfo ei, JaxWsImplementorInfo implementorInfo)
         throws EndpointException {
         super(bus, s, ei);

Modified: incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java Wed Jan  2 13:39:27 2008
@@ -19,7 +19,6 @@
 
 package org.apache.cxf.ws.addressing;
 
-
 import java.text.MessageFormat;
 import java.util.Collection;
 import java.util.Iterator;
@@ -29,18 +28,24 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-
 import javax.wsdl.extensions.ExtensibilityElement;
 import javax.xml.namespace.QName;
+import javax.xml.ws.WebFault;
 
+import org.apache.cxf.binding.soap.SoapConstants;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.FaultMode;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.service.model.FaultInfo;
+import org.apache.cxf.service.model.MessageInfo;
+import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.ws.addressing.policy.MetadataConstants;
@@ -57,6 +62,7 @@
     private static final Logger LOG = 
         LogUtils.getL7dLogger(MAPAggregator.class);
     private static final ResourceBundle BUNDLE = LOG.getResourceBundle();
+
     
 
     /**
@@ -370,18 +376,148 @@
      */
     private AddressingPropertiesImpl assembleGeneric(Message message) {
         AddressingPropertiesImpl maps = getMAPs(message, true, true);
-        // MessageID        
+        // MessageID
         if (maps.getMessageID() == null) {
             String messageID = ContextUtils.generateUUID();
             maps.setMessageID(ContextUtils.getAttributedURI(messageID));
         }
+
         // Action
         if (ContextUtils.hasEmptyAction(maps)) {
             maps.setAction(ContextUtils.getAction(message));
+
+            if (ContextUtils.hasEmptyAction(maps)
+                && ContextUtils.isOutbound(message)) {
+                maps.setAction(ContextUtils.getAttributedURI(getActionUri(message)));
+            }
         }
+
         return maps;
     }
 
+    private String getActionFromInputMessage(final OperationInfo operation) {
+        MessageInfo inputMessage = operation.getInput();
+
+        if (inputMessage.getExtensionAttributes() != null) {
+            QName inputAction = (QName)inputMessage.getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME);
+            if (inputAction != null) {
+                return inputAction.getLocalPart();
+            }
+        }
+        return null;
+    }
+    
+    private String getActionFromOutputMessage(final OperationInfo operation) {
+        MessageInfo outputMessage = operation.getOutput();
+        if (outputMessage != null && outputMessage.getExtensionAttributes() != null) {
+            QName outputAction = 
+                (QName)outputMessage.getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME);
+            if (outputAction != null) {
+                return outputAction.getLocalPart();
+            }
+        }
+        return null;
+    }
+
+    private boolean isSameFault(final FaultInfo faultInfo, String faultName) {
+        if (faultInfo.getName() == null || faultName == null) {
+            return false;
+        }
+        String faultInfoName = faultInfo.getName().getLocalPart();
+        return faultInfoName.equals(faultName) 
+            || faultInfoName.equals(StringUtils.uncapitalize(faultName));
+    }
+
+    private String getActionBaseUri(final OperationInfo operation) {
+        String interfaceName = operation.getInterface().getName().getLocalPart();
+        return addPath(operation.getName().getNamespaceURI(), interfaceName);
+    }
+
+    private String getActionFromFaultMessage(final OperationInfo operation, final String faultName) {
+        if (operation.getFaults() != null) {
+            for (FaultInfo faultInfo : operation.getFaults()) {
+                if (isSameFault(faultInfo, faultName)) {
+                    if (faultInfo.getExtensionAttributes() != null) {
+                        QName faultAction = 
+                            (QName)faultInfo.getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME);
+                        return faultAction.getLocalPart();
+                    }
+                    return addPath(addPath(getActionBaseUri(operation), "Fault"), 
+                                   faultInfo.getName().getLocalPart());
+                }
+            }
+        }
+        return addPath(addPath(getActionBaseUri(operation), "Fault"), faultName);
+    }
+
+    private String getFaultNameFromMessage(final Message message) {
+        Exception e = message.getContent(Exception.class);
+        Throwable cause = e.getCause();
+        if (cause == null) {
+            cause = e;
+        }
+        if (e instanceof Fault) {
+            WebFault t = cause.getClass().getAnnotation(WebFault.class);
+            if (t != null) {
+                return t.name();
+            }
+        }
+        return cause.getClass().getSimpleName();    
+    }
+
+    protected String getActionUri(Message message) {
+        OperationInfo op = message.getExchange().get(OperationInfo.class);
+
+        String actionUri = (String) message.get(SoapConstants.SOAP_ACTION);
+        if (actionUri != null) {
+            return actionUri;
+        }
+        String opNamespace = getActionBaseUri(op);
+        
+        if (ContextUtils.isRequestor(message)) {
+            String explicitAction = getActionFromInputMessage(op);
+            if (explicitAction != null) {
+                actionUri = explicitAction;
+            } else if (null == op.getInputName()) {
+                actionUri = addPath(opNamespace, op.getName().getLocalPart() + "Request");
+            } else {
+                actionUri = addPath(opNamespace, op.getInputName());
+            }
+        } else if (ContextUtils.isFault(message)) {
+            String faultName = getFaultNameFromMessage(message);
+            actionUri = getActionFromFaultMessage(op, faultName);
+        } else {
+            String explicitAction = getActionFromOutputMessage(op);
+            if (explicitAction != null) {
+                actionUri = explicitAction;
+            } else if (null == op.getOutputName()) {
+                actionUri = addPath(opNamespace, op.getOutput().getName().getLocalPart());
+            } else {
+                actionUri = addPath(opNamespace, op.getOutputName());
+            }
+        }
+        return actionUri;
+    }
+
+
+    private String getDelimiter(String uri) {
+        if (uri.startsWith("urn")) {
+            return ".";
+        }
+        return "/";
+    }
+
+    private String addPath(String uri, String path) {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append(uri);
+        String delimiter = getDelimiter(uri);
+        if (!uri.endsWith(delimiter) && !path.startsWith(delimiter)) {
+            buffer.append(delimiter);
+        }
+        buffer.append(path);
+        return buffer.toString();
+    }
+    
     /**
      * Add MAPs which are specific to the requestor or responder role.
      *

Modified: incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/Names.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/Names.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/Names.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/Names.java Wed Jan  2 13:39:27 2008
@@ -25,6 +25,8 @@
 import java.util.Set;
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.binding.soap.SoapConstants;
+
 
 /**
  * Holder for WS-Addressing names (of headers, namespaces etc.).
@@ -146,7 +148,7 @@
     public static final String SOAP12HTTP_ADDRESSING_BINDING = 
         "http://www.w3.org/2003/05/soap-envelope?addressing=ms";
     
-    public static final String SOAP_ACTION_HEADER = "SOAPAction";
+    public static final String SOAP_ACTION_HEADER = SoapConstants.SOAP_ACTION;
     
     /**
      * The set of headers understood by the protocol binding.

Modified: incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java Wed Jan  2 13:39:27 2008
@@ -73,7 +73,7 @@
 public class MAPCodec extends AbstractSoapInterceptor {
 
     private static final Logger LOG = LogUtils.getL7dLogger(MAPCodec.class);
-    private static final String IS_REFERENCE_PARAM_ATTR_NAME = "isReferenceParameter";
+    private static final String IS_REFERENCE_PARAM_ATTR_NAME = "IsReferenceParameter";
 
     /**
      * REVISIT: map usage that the *same* interceptor instance 

Modified: incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java?rev=608239&r1=608238&r2=608239&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java Wed Jan  2 13:39:27 2008
@@ -36,6 +36,7 @@
 import org.w3c.dom.NodeList;
 
 
+import org.apache.cxf.binding.soap.SoapBindingConstants;
 import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.SoapVersion;
@@ -336,7 +337,7 @@
         if (preExistingSOAPAction) {
             List<String> soapAction = new ArrayList<String>();
             soapAction.add("\"foobar\"");
-            mimeHeaders.put("SOAPAction", soapAction);
+            mimeHeaders.put(SoapBindingConstants.SOAP_ACTION, soapAction);
         }
         if (invalidMAP) {
             message.put("org.apache.cxf.ws.addressing.map.fault.name",