you web service response doesn't contain any content-type header? How does the response look like? Does it start with "<?xml..."?
You can configure your own PageCreator on the WebClient to handle this response as xml and you'll be able to use xpath verification. Cheers, Marc. -- Blog: http://mguillem.wordpress.com Robert Koberg wrote: > Hi, > > In testing web services is it possible to use verifyXPath, > verifyElement and/or verifyElementText or something more precise instead > of just verify text? (I don't know regex exceptionally well...) > > For example, a response might include the following header or body > elements: > > <userAuthenticated>true</userAuthenticated> > <forceChangePassword>true</forceChangePassword> > > Using: > <verifyText text="userAuthenticated>true"/> > works for my sample test environment, but I don't know if there will be > whitespace in production. > > Using: > <verifyElement type="userAuthenticated" text="true"/> > I get the error message ClassCastException > > Using: > <verifyXPath xpath="//userAuthenticated[1][contains(text(), > 'true')]"/> > I get the error message: > Current response is not an HTML or XML page but of type > (com.gargoylesoftware.htmlunit.UnexpectedPage) > > (it is a valid web service response (so it is well-formed)) > > Any ideas? > > thanks, > -Rob > > > > > > > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest > _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

