Hi - When I'm asking webtest to parse an xpath in a response (using
storeXPath, verifyXPath, etc), if there's a namespace as part of the
expression, jaxen barfs resolving the namespace.

EG, if the response looks like this:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:ns0="http://www.atg.com/atg.security"; 
xmlns:ns1="http://www.atg.com/javax.servlet"; 
xmlns:ns2="http://www.atg.com/webservices";
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
<env:Body><ns2:logoutUserResponse/>
</env:Body>
</env:Envelope>


And I try to do something like 

<verifyXPath
Xpath="//ns2:logoutUserResponse" />

I'll get  a similar message to this:


 Message was: Cannot resolve namespace prefix 'ns2'
[storeXPath] ERROR (com.canoo.webtest.steps.Step) - Cannot handle
unexpected exception in step StoreXPath at
/export/home/mknapp/canoo/webtests/UseCases/scratchUseCase.xml:86:  with
(taskName="storeXPath", property="XP", XPath="ns2:logoutUserResponse")
[storeXPath] org.jaxen.UnresolvableException: Cannot resolve namespace
prefix 'ns2'


Any idea on how I can get this to resolve?

Thanks (and thanks for the prior help as well.....looks like this will
work nicely for  soap testing, assuming I  can get past these small
hurdles...)

mike
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to