Check jmeter.log - I exepct you will find an NPE.

It looks like the XPath evaluation is returning an XNodeSet with no
children, hence the NPE.

Unfortunately I don't know how to detect that the matched item is an
attribute, nor how to extract its value if so. Suggestions welcome!


S.
On 08/06/07, Knut Borchart <[EMAIL PROTECTED]> wrote:
Hi,

i am trying to use xpath assertion and extraction and it seems i cannot get
them to work. Here is what i am trying to accomplish:

1) xpath assertion for a http request. the response document is:

<?xml version="1.0" encoding="UTF-8"?>
<CompositeResponse elapsed="0" date="2007-06-08T14:17:32+0100">
   <CustomerAuthenticateResponse/>
   <CustomerDetailsResponse accountId="kborchart" customerId="100" domain="
test.com" anonymous="false" currency="EUR" currencyPrefix="�"/>
   <DeviceTypeResponse deviceID="ABC"/>
</CompositeResponse>

the xpath assertion i want to use is:

/CompositeResponse/[EMAIL PROTECTED]"kborchart"]

This returns 1 node when i test the xpath query in another editor, but in
Jmeter i never get a positive result. In fact i could not find any xpath
query besides "/" that could generate a positive result. I tried to shorten
the query to /CompositeResponse or /compositeresponse (i am using the
tolerant parser, because otherwise i get a "Content is not allowed in
trailing section." error in the log. It seems there is a strange character
at the end of the response). What is wrong with my approach?

2) xpath extraction of an attribute value. The response document is:

<?xml version="1.0" encoding="UTF-8"?>
<CompositeResponse elapsed="0" date="2007-06-08T10:36:21+0100">
   <CustomerBalanceResponse balance="400.00"/>
   <FOOpenGameResponse gameId="12345678" nextDrawId="0"/>
</CompositeResponse>

The xpath query i want to use is:

/CompositeResponse/FOOpenGameResponse/@gameId

This returns "12345678" in another xml editor, but in jmeter does not find
anything. Is attribute value extraction not supported?

Thanks for any help or pointers!

Kind regards, Knut

Reply via email to