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 2012/07/31 18:26:29 UTC

svn commit: r1367658 - /cxf/branches/2.4.x-fixes/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js

Author: dkulp
Date: Tue Jul 31 16:26:29 2012
New Revision: 1367658

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

........
  r1367643 | dkulp | 2012-07-31 12:04:17 -0400 (Tue, 31 Jul 2012) | 18 lines

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

Modified: cxf/branches/2.4.x-fixes/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js?rev=1367658&r1=1367657&r2=1367658&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js (original)
+++ cxf/branches/2.4.x-fixes/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js Tue Jul 31 16:26:29 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 */