cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1367628 - /cxf/trunk/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
Date Tue, 31 Jul 2012 15:55:01 GMT
Author: dkulp
Date: Tue Jul 31 15:55:01 2012
New Revision: 1367628

URL: http://svn.apache.org/viewvc?rev=1367628&view=rev
Log:
[CXF-4447] Output the correct soapaction

Modified:
    cxf/trunk/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js

Modified: cxf/trunk/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js?rev=1367628&r1=1367627&r2=1367628&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
(original)
+++ cxf/trunk/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
Tue Jul 31 15:55:01 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