New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XPath Extractor namespace problems #2002
Comments
Sebb (migrated from Bugzilla): xpathns1.xml<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<ResponseHeader xmlns="http://biz.aol.com/schema/header/2006-10">
<statusCode>200</statusCode>
<statusText>Ok</statusText>
</ResponseHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<ns:registerOfferResponse xmlns:ns="http://biz.aol.com/schema/2006-12-18">
<ns:result>0</ns:result>
</ns:registerOfferResponse>
</SOAP-ENV:Body>
</soapenv:Envelope> |
Sebb (migrated from Bugzilla): xpathns2.xml<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:ns="http://biz.aol.com/schema/2006-12-18"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<ResponseHeader xmlns="http://biz.aol.com/schema/header/2006-10">
<statusCode>200</statusCode>
<statusText>Ok</statusText>
</ResponseHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<ns:registerOfferResponse>
<ns:result>0</ns:result>
</ns:registerOfferResponse>
</SOAP-ENV:Body>
</soapenv:Envelope> |
Sebb (migrated from Bugzilla): |
@pmouawad (migrated from Bugzilla): Regards |
@pmouawad (migrated from Bugzilla):
|
Sebb (migrated from Bugzilla): Seems wrong for JMeter to add a work-round for problems in Xalan which may one day be resolved. It would probably be more useful to ensure that the XPath elements can use an alternate parser. If the use-case turns out to be more frequent, and alternate parsers cannot help, then it would probably be worthwhile adding the work-round. |
@pmouawad (migrated from Bugzilla): Second, examining Xalan , Dom4j and jaxen: it seems giving them the prefix mapping is mandatory. So with first issue we are stuck with Xalan (unless you see a solution). |
Sebb (migrated from Bugzilla): We should perhaps work towards removing that dependency ... seems like it is not very efficient anyway. As a work-round, the simplest would be to allow the user to supply a properties file to provide the additional NS mappings. If we do go down this route, we should probably provide the additional mappings for use with all other XPath elements, e.g. the XPath function. |
@pmouawad (migrated from Bugzilla): URL: http://svn.apache.org/viewvc?rev=1204254&view=rev Modified: |
@pmouawad (migrated from Bugzilla): URL: http://svn.apache.org/viewvc?rev=1204280&view=rev Added: Date: Sun Nov 20 22:16:51 2011 URL: http://svn.apache.org/viewvc?rev=1204281&view=rev Modified: |
Sebb (Bug 43294):
XPath Extractor unconditionally sets namespace=false in the document factory
call; it should be settable in the GUI.
There is also a problem resolving namespaces defined in child elements - xalan
appears to only understand XPath namespaces if they are defined at the top-
level.
For example, xpathns1.xml defines the namespace "ns" on the first use of the
ns namespace - XPath cannot handle //ns:result as the namespace is not defined.
Whereas xpathns2.xml defines the namespace "ns" on the root node,
and //ns:result works OK - once the document factory namespace is set true.
xpathns.jmx is a test plan showing the problem (requires namespace=true)
Votes in Bugzilla: 1
Severity: normal
OS: All
The text was updated successfully, but these errors were encountered: