Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOAP Action not set when HeaderManager is specified #1729

Closed
asfimport opened this issue May 25, 2006 · 7 comments
Closed

SOAP Action not set when HeaderManager is specified #1729

asfimport opened this issue May 25, 2006 · 7 comments

Comments

@asfimport
Copy link
Collaborator

Davanum Srinivas (Bug 39656):
Hi,

Could you please consider this tiny enhancement to add SOAPAction explicitly if
the user does not specify one in the header manager?

thanks,
dims

Version: Nightly
Severity: normal
OS: other

@asfimport
Copy link
Collaborator Author

Davanum Srinivas (migrated from Bugzilla):
Created attachment soap_action.txt: Patch to set the soap action if it is not specified in the header manager

soap_action.txt
Index: src/protocol/http/org/apache/jmeter/protocol/http/sampler/SoapSampler.java
===================================================================

C:\APACHE\jmeter>diff -E -b -B -w -u -L "src/protocol/http/org/apache/jmeter/protocol/http/sampler/SoapSampler.java	(revision 409249)" -L "src/protocol/http/org/apache/jmeter/protocol/http/sampler/SoapSampler.java	(working copy)" src\protocol\http\org\apache\jmeter\protocol\http\sampler\.svn\text-base\SoapSampler.java.svn-base src\protocol\http\org\apache\jmeter\protocol\http\sampler\.svn\tmp\SoapSampler.java.tmp 
--- src/protocol/http/org/apache/jmeter/protocol/http/sampler/SoapSampler.java	(revision 409249)
+++ src/protocol/http/org/apache/jmeter/protocol/http/sampler/SoapSampler.java	(working copy)
@@ -129,6 +129,10 @@
 				Header hd = mngr.getHeader(idx);
 				connection.setRequestProperty(hd.getName(), hd.getValue());
 			}
+            // If the soap action is not specified in the header manager 
+            if(getSendSOAPAction() && connection.getRequestProperty("SOAPAction") == null) {
+                connection.setRequestProperty("SOAPAction", "\"" + getSOAPAction() + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            }
 		} else {
 			// otherwise we use "text/xml" as the default
 			connection.setRequestProperty(HEADER_CONTENT_TYPE, "text/xml"); //$NON-NLS-1$

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
Seems like a good idea - I'll try to add it shortly.

@asfimport
Copy link
Collaborator Author

peter lin (migrated from Bugzilla):
It's probably ok to add it if the user doesn't specificy a SOAPAction. To the
best of my knowledge, only .NET uses SOAPAction. Sun's JWSDP, apache axis,
apache soap, weblogic ws, IBM ws and several C/C++ webservice toolkit all ignore
soapaction.

peter

@asfimport
Copy link
Collaborator Author

Davanum Srinivas (migrated from Bugzilla):
Axis2 uses SOAPAction :)

@asfimport
Copy link
Collaborator Author

peter lin (migrated from Bugzilla):
I wasn't aware that Axis2 now uses SOAPAction. I assumed axis2 is the same as
axis 1.x

thanks for the info.

peter

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
Just wondering whether the GUI should always override the Header Manager -
might that not be more useful?

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
After discussion, decided to always use the value on the GUI, whether or not a
Header Manager is present, as this is how other samplers work (config items
are used as defaults).

Code has been updated in 2.1 branch.
Nighttly build 2-1.20060526 contains the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant