Author: sebb
Date: Thu Oct 23 04:34:33 2008
New Revision: 707345
URL: http://svn.apache.org/viewvc?rev=707345&view=rev
Log:
Use Connection headers as these are more complete
No point retrieving the soap connection from the message when we have just put
it there
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java?rev=707345&r1=707344&r2=707345&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java
Thu Oct 23 04:34:33 2008
@@ -505,16 +505,16 @@
spconn.setMaintainSession(true);
msg.setSOAPTransport(spconn);
msg.send(this.getUrl(), this.getSoapAction(), msgEnv);
+ result.setResponseHeaders(convertSoapHeaders(spconn.getHeaders()));
if (this.getHeaderManager() != null) {
this.getHeaderManager().setSOAPHeader(spconn);
}
- SOAPTransport st = msg.getSOAPTransport();
BufferedReader br = null;
- if (st != null && st.receive() != null) {
- br = st.receive();
- SOAPContext sc = st.getResponseSOAPContext();
+ if (spconn.receive() != null) {
+ br = spconn.receive();
+ SOAPContext sc = spconn.getResponseSOAPContext();
// Set details from the actual response
// Needs to be done before response can be stored
final String contentType = sc.getContentType();
@@ -535,21 +535,14 @@
}
result.setSuccessful(true);
result.setResponseCodeOK();
+ result.setResponseMessageOK();
} else {
result.sampleEnd();
result.setSuccessful(false);
- if (st != null){
- final String contentType =
st.getResponseSOAPContext().getContentType();
- result.setContentType(contentType);
- result.setEncodingAndType(contentType);
-
result.setResponseData(st.getResponseSOAPContext().toString().getBytes(result.getDataEncodingWithDefault()));
- }
- }
- if (st != null) {
- SOAPContext sc = st.getResponseSOAPContext();
-
result.setResponseHeaders(convertSoapHeaders(sc.getRootPart().getAllHeaderLines()));
- } else {
- result.setResponseHeaders("error");
+ final String contentType =
spconn.getResponseSOAPContext().getContentType();
+ result.setContentType(contentType);
+ result.setEncodingAndType(contentType);
+
result.setResponseData(spconn.getResponseSOAPContext().toString().getBytes(result.getDataEncodingWithDefault()));
}
if (br != null) {
br.close();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]