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] > >

