cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1367643 - /cxf/branches/2.5.x-fixes/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
Date Tue, 31 Jul 2012 16:04:18 GMT
Author: dkulp
Date: Tue Jul 31 16:04:17 2012
New Revision: 1367643

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

........
  r1367631 | dkulp | 2012-07-31 11:58:42 -0400 (Tue, 31 Jul 2012) | 10 lines

  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.5.x-fixes/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js

Modified: cxf/branches/2.5.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.5.x-fixes/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js?rev=1367643&r1=1367642&r2=1367643&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
(original)
+++ cxf/branches/2.5.x-fixes/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
Tue Jul 31 16:04:17 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 */



Mime
View raw message