axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Different behaviour for AXIOMXPath and DOMXPath?
Date Fri, 25 Nov 2005 09:55:16 GMT


i'am trying to write a service, which is independed from the version of
Axis (1.2 and 2). The access to the request data works with XPath through

But although the code is the same (with the exception of AXIOMXPath and
DOMXPath), applying the XPath expressions

1)    /a0:GetPersons/a0:PersonIds/a0:PersonId
2)    /a0:GetPersons/a0:RoleList

works for Axis1, but not for Axis2.

Could someone tell me, if there is a different behaviour between AXIOMXPath
and DOMXPath?

Thank you.

Axis 1 gets the request:

<ns1:GetPersons xmlns:ns1="">

Axis 2 gets the request:

<q0:GetPersons xmlns:q0="">

The code sample is:

XPath xPath =     for Axis1: new DOMXPath(expression);            for
Axis2: new AXIOMXPath(expression);
xPath.addNamespace("a0", getNamespace());
List results = xPath.selectNodes(node);

View raw message