You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2006/04/08 03:08:27 UTC

DO NOT REPLY [Bug 39252] New: - Set SoapSampler to set sample result with XmlData

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39252>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39252

           Summary: Set SoapSampler to set sample result with XmlData
           Product: JMeter
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: shahs@yahoo-inc.com


Would it be possible to modify SoapSampler.java to set the Sampler Data of the
SampleResult to XmlData provided by the GUI?  This would involve changing the
last few lines of th e
public SampleResult sample(Entry e) method to :

	public SampleResult sample(Entry e) {
    URL url = null;
    try {
			url = new URL(getURLData());
			setDomain(url.getHost());
			setPort(url.getPort());
			setProtocol(url.getProtocol());
			setMethod(POST);
			if (url.getQuery() != null && url.getQuery().compareTo("") != 0) {
				setPath(url.getPath() + "?" + url.getQuery());
			} else {
				setPath(url.getPath());
			}
			// make sure the Post header is set
			URLConnection conn = url.openConnection();
			setPostHeaders(conn);
		} catch (MalformedURLException e1) {
			log.error("Bad url: " + getURLData(), e1);
		} catch (IOException e1) {
			log.error("Bad url: " + getURLData(), e1);
		}
		HTTPSampleResult result = (HTTPSampleResult)super.sample(e);
    result.setDataType(SampleResult.TEXT);
    if(url != null) {
      result.setSamplerData("\n" + getXmlData());
    }
    return result;
  }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 39252] - Set SoapSampler to set sample result with XmlData

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39252>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39252


sebb@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEEDINFO




------- Additional Comments From sebb@apache.org  2006-04-13 16:08 -------
(In reply to comment #2)
> Hi, Thanks for applying the patch, but it seems like it the patch I submitted
> does not work against the current nightly builds.  I had tested it against 
2.1.1
> release.  The following fix I think in the  public SampleResult sample(Entry 
e)
> should be changed to:
> // Bug 39252 set SoapSampler sample result from XML data
> /*
> SampleResult sampleResult = super.sample(e);
> sampleResult.setDataType(SampleResult.TEXT);
> sampleResult.setSamplerData(getXmlData());
> return sampleResult;
> */
> HTTPSampleResult result = (HTTPSampleResult)super.sample(e);
> result.setDataType(SampleResult.TEXT);
> result.setSamplerData("\n" + getXmlData());

The above has been done (but I removed the \n prefix)

> result.setQueryString("\n" + getXmlData());

This was not done, as it was not asked for - see your original posting.

Why do you need both set to the same value?

> return result;

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 39252] - Set SoapSampler to set sample result with XmlData

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39252>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39252


shahs@yahoo-inc.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Additional Comments From shahs@yahoo-inc.com  2006-04-13 15:25 -------
Hi, Thanks for applying the patch, but it seems like it the patch I submitted
does not work against the current nightly builds.  I had tested it against 2.1.1
release.  The following fix I think in the  public SampleResult sample(Entry e)
should be changed to:

// Bug 39252 set SoapSampler sample result from XML data
/*
SampleResult sampleResult = super.sample(e);
sampleResult.setDataType(SampleResult.TEXT);
sampleResult.setSamplerData(getXmlData());
return sampleResult;
*/
HTTPSampleResult result = (HTTPSampleResult)super.sample(e);
result.setDataType(SampleResult.TEXT);
result.setSamplerData("\n" + getXmlData());
result.setQueryString("\n" + getXmlData());
return result;

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 39252] - Set SoapSampler to set sample result with XmlData

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39252>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39252





------- Additional Comments From shahs@yahoo-inc.com  2006-04-13 16:13 -------
(In reply to comment #3)
> (In reply to comment #2)
> > HTTPSampleResult result = (HTTPSampleResult)super.sampe(e);
> > result.setDataType(SampleResult.TEXT);
> > result.setSamplerData("\n" + getXmlData());
> 
> The above has been done (but I removed the \n prefix)
> 
> > result.setQueryString("\n" + getXmlData());
> 
> This was not done, as it was not asked for - see your original posting.
> 
> Why do you need both set to the same value?
> 

I'm not sure, but it only worked in the nightlies when I coded it as above.

Thanks

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 39252] - Set SoapSampler to set sample result with XmlData

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39252>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39252


shahs@yahoo-inc.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From shahs@yahoo-inc.com  2006-04-14 21:37 -------
(In reply to comment #5)
> OK, I've found the problem.
> 
> The HTTPSample assumes that POST data is stored in the QueryString (dunno 
> why); and when it overrides getSampleData it ignores samplerData entirely, so 
> the information is not shown in the Tree View pane.
> 
> This probably needs tidying up a bit; in the meanwhile, I've saved the data to 
> the query string as well.
> 
> Perhaps you could now try the new nightly?
> Also, please check that the correct information is being written to the JTL 
> files

I tried out the new nightly it looks correct.  Thanks a lot!


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 39252] - Set SoapSampler to set sample result with XmlData

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39252>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39252





------- Additional Comments From sebb@apache.org  2006-04-13 18:37 -------
OK, I've found the problem.

The HTTPSample assumes that POST data is stored in the QueryString (dunno 
why); and when it overrides getSampleData it ignores samplerData entirely, so 
the information is not shown in the Tree View pane.

This probably needs tidying up a bit; in the meanwhile, I've saved the data to 
the query string as well.

Perhaps you could now try the new nightly?
Also, please check that the correct information is being written to the JTL 
files

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 39252] - Set SoapSampler to set sample result with XmlData

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39252>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39252


sebb@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From sebb@apache.org  2006-04-10 01:47 -------
Thanks for the suggestion - it has been included in the 2.1 branch code, and
will be included in JMeter 2.1.2.

If you want to give it a try, the nightly 2-1.20060410 has the fix included.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org