Hi yes it will cause issues, the response isnt XML Are you using soap with attachments by any chance? If so I can only the following options. a. use a regex extractor instead <sessionID>([^<]*) b. Use the WebService SOAP sampler (Im not sure if this supports attachments or not , but you could try it)
regards deepak On Tue, Oct 20, 2009 at 9:39 AM, <[email protected]> wrote: > Yes, there is a MIMEBoundary wrapper and some headers. Here is the > complete response when "Show Text" is checked: > > --MIMEBoundaryurn_uuid_5A1CBCA11D2362984F1256056381622 > Content-Type: application/xop+xml; charset=utf-8; > type="application/soap+xml" > Content-Transfer-Encoding: binary > Content-ID: > <0.urn:uuid:[email protected]<0.urn%3auuid%[email protected]> > > > > <?xml version='1.0' encoding='utf-8'?> > <soapenv:Envelope > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> > <soapenv:Body> > <ns1:LogonResponse > xmlns:ns1="http://this.is.some.package.name/webservice"> > <sessionID>12345</sessionID> > </ns1:LogonResponse> > </soapenv:Body> > </soapenv:Envelope> > --MIMEBoundaryurn_uuid_5A1CBCA11D2362984F1256056381622-- > > > Rendering the XML removes (or appears to remove) the extra data and trim > the response down to what I first posted. Could this be my problem? > > Thanks, > > -Paul > > > > -----Original Message----- > From: > jmeter-user-return-27602-paul_murdoch=emainc....@jakarta.apache.org > [mailto:[email protected]. > org] On Behalf Of Deepak Shetty > Sent: Tuesday, October 20, 2009 12:22 PM > To: JMeter Users List > Subject: Re: XPath Extractor not extracting > > hi > it doesnt look like you are getting valid xml back . If you add a view > results tree listener , what do you get back as the response exactly?are > you > getting some content before <?xml...?>. > > regards > deepak > > On Tue, Oct 20, 2009 at 5:45 AM, <[email protected]> wrote: > > > Deepak, > > > > Here is my test plan with the Debug Sampler added. Everything else > was > > all ready there. > > > > Test Plan > > Thread Group > > UDV (declares sessID) > > SOAP XML/RPC (returns sessionID) > > HTTP Header Manager (needed for SOAP v1.2) > > XPath Extractor (sets sessID = sessionID NOT > > WORKING) > > Debug Sampler (check sessID) > > SOAP XML/RPC (needs a valid ${sessID}) > > Graph Results > > View Tree Results > > Workbench > > > > I am getting an error in jmeter.log: > > > > ERROR - jmeter.util.XPathUtil: Type=Val=false Tol=false > > org.xml.sax.SAXParseException: Content is not allowed in prolog. > > WARN - jmeter.extractor.XPathExtractor: error on (//sessionID)Content > > is not allowed in prolog. > > > > I forgot to mention that the first time. So I'm still not able to > > extract sessionID in the XPath Extractor. The global UDV is for > requests > > made later that will make use of the sessionID. I'm using JMeter > 2.3.4. > > The Debug Sampler reports sessID=0 (default value). Do you know what > is > > causing the error in jmeter.log? Thanks in advance. > > > > -Paul > > > > > > -----Original Message----- > > From: > > jmeter-user-return-27579-paul_murdoch=emainc....@jakarta.apache.org > > > [mailto:[email protected]. > > org] On Behalf Of Deepak Shetty > > Sent: Monday, October 19, 2009 4:37 PM > > To: JMeter Users List > > Subject: Re: XPath Extractor not extracting > > > > works fine for me > > Thread Group > > SOAP XML/RPC (returning your response , use namespaces checked) > > Xpath Extractor (child of above) > > Debug Sampler (Shows the value of the variable) > > > > So are you getting any errors in jmeter.log? Also you seem to mention > > global > > UDV? do you mean you also have this as a user defined variable (it > > shouldnt > > be needed) > > > > Can you add A View Results Tree Listener and a Debug Sampler > immediately > > after so that you can verify the values of the variables ? Also are > you > > using the latest version of jmeter (2.3.4) > > regards > > deepak > > > > On Mon, Oct 19, 2009 at 7:02 AM, <[email protected]> wrote: > > > > > I would like to get the sessionID out of the following response: > > > > > > > > > > > > <?xml version='1.0' encoding='utf-8'?> > > > > > > <soapenv:Envelope > > > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> > > > > > > <soapenv:Body> > > > > > > <ns1:LogonResponse > > > xmlns:ns1="http://this.is.some.package.name/webservice"> > > > > > > > > > <sessionID>12345</sessionID> > > > > > > </ns1:LogonResponse> > > > > > > </soapenv:Body> > > > > > > </soapenv:Envelope> > > > > > > > > > > > > In the XPath Extractor GUI I have the XPath Query: //sessionID > > > > > > > > > > > > I know that is a valid query for this response because I tested it > > with > > > another tool. This is a response from a login request in my thread > > > group and I need the sessionID to send any further requests to my > web > > > service. Also if I place a valid sessionID in the default value in > > the > > > GUI everything works. I need this to happen automatically though > for > > > load and stress testing with multiple users so I can't enter the > > > sessionID manually. I just did that to debug this problem. I'm not > > > using Tidy and I've tried with and without "Use Namespaces?" > checked. > > > The sessionID is a global UDV in thread group called "sessID" and > that > > > is the field in the Reference Name in the XPath Extractor GUI. I > then > > > use ${sessID} in any later requests. Like I said before it works if > I > > > login with another tool and then place a valid sessionID in the > > Default > > > Value field, but that is a hack. Is there any special XPath syntax > or > > > rules that apply to JMeter in this case? Thanks in advance. > > > > > > > > > > > > -Paul > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >

