Author: dkulp
Date: Tue Jul 31 15:58:42 2012
New Revision: 1367631

URL: http://svn.apache.org/viewvc?rev=1367631&view=rev
Log:
Merged revisions 1367628 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1367628 | dkulp | 2012-07-31 11:55:01 -0400 (Tue, 31 Jul 2012) | 2 lines

  [CXF-4447] Output the correct soapaction

........

Modified:
    
cxf/branches/2.6.x-fixes/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js

Modified: 
cxf/branches/2.6.x-fixes/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js?rev=1367631&r1=1367630&r2=1367631&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
 (original)
+++ 
cxf/branches/2.6.x-fixes/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
 Tue Jul 31 15:58:42 2012
@@ -715,16 +715,26 @@ function org_apache_cxf_client_request(u
                this.req.setRequestHeader("Content-Type", 
"text/xml;charset=utf-8");
        }
 
-    if (headers) { // must be array indexed by header field.
+       var action = this.soapAction;
+       if (headers) { // must be array indexed by header field.
         // avoid extra properties on the headers.
         for (var h in headers) {
-            if(headers.hasOwnProperty(h)) {
+               if (h == "SOAPAction") {
+                action = headers[h];
+               } else if(headers.hasOwnProperty(h)) {
                 this.req.setRequestHeader(h, headers[h]);
             }
         }
-    }  
+       }       
 
-       this.req.setRequestHeader("SOAPAction", this.soapAction);
+       if (action.length == 0) {
+       action = "\"\"";
+       }
+       if (action.charAt(0) != '"') {
+       action = '\"' + action + '\"';
+       }
+    
+       this.req.setRequestHeader("SOAPAction", action);
        this.req.setRequestHeader("MessageType", this.messageType);
 
        var requester = this; /* setup a closure */


Reply via email to