Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@apache.org Received: (qmail 69797 invoked from network); 9 Sep 2002 18:54:32 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 9 Sep 2002 18:54:32 -0000 Received: (qmail 25697 invoked by uid 97); 9 Sep 2002 18:55:09 -0000 Delivered-To: qmlist-jakarta-archive-jmeter-user@jakarta.apache.org Received: (qmail 25645 invoked by uid 97); 9 Sep 2002 18:55:07 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 25629 invoked by uid 98); 9 Sep 2002 18:55:05 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <001401c25831$398a4540$3358989e@skate> From: "Pete Marshall" To: Subject: Possible bug in HTTPSample/SOAPSample Date: Mon, 9 Sep 2002 19:46:13 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000F_01C25839.8D8551A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_000F_01C25839.8D8551A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Problem emitting SOAP/XML messages from the SOAP/XML-RPC Request Sampler. I was unable to get any output from this sampler which prompted a bit of debugging. It seems that the HTTPRequest and the subclass SOAPSampler between them are getting confused about the state of the connection. The HTTPSampler is setting some header elements (content length, mime type), then opening the connection, then if the request type is post it tries to add the soap message in the subclass SOAPSampler. However, the=20 SOAPSampler needs to set the mime type and the content length but the connection is now open. See (J2SDK1.4.1 java doc for=20 URLConnection.setRequestProperty()) An exception (InvalidStateException) is thrown which causes the finally part of the sample method to be execute. To prove this I modified HTTPSample.sampleResult() at around lines 895 so that if this is a post we add the post content then open the connection. In my simple test I only actually have=20 a SOAPSample. This works producing SOAP in the tcpmon monitor=20 output. My quick and dirty patch looks like : HTTPSampler.sample 890 if (!redirected 891 && getProperty(HTTPSampler.METHOD).equals(HTTPSampler.POST)) 892 { 893 postWriter.setHeaders(conn,this); 894 } 895 if (!redirected 896 && getProperty(HTTPSampler.METHOD).equals(HTTPSampler.POST)) 897 { 898 sendPostData(conn); 899 time =3D connect(); 900 } 901 else 902 time =3D connect(); This is not a fix, its a test patch. It wont work generally; it will break a simple HTTPSample with a post. Hope this helps a bit JMeter Nightly build 5 sept 2002 JDK j2sdk1.4.1 =20 Debugger JSwat 2.8 ( - fantastic ) tcpmon OS Windows XP ( - ughh ) Regards Pete Marshall Software By Numbers Ltd ------=_NextPart_000_000F_01C25839.8D8551A0--