axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreas.k...@daimlerchrysler-bank.com
Subject Different behaviour for AXIOMXPath and DOMXPath?
Date Fri, 25 Nov 2005 09:55:16 GMT

Hi,

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
Jaxen.

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.
Andreas




Axis 1 gets the request:

<ns1:GetPersons xmlns:ns1="http://partner-service.dcb.com">
<ns1:Header>
<ns1:Source>ich</ns1:Source>
</ns1:Header>
<ns1:PersonIds>
<ns1:PersonId>123</ns1:PersonId>
</ns1:PersonIds>
<ns1:RoleList>VIP</ns1:RoleList>
</ns1:GetPersons>

Axis 2 gets the request:

<q0:GetPersons xmlns:q0="http://partner-service.dcb.com">
<q0:Header>
<q0:Source>ich</q0:Source>
</q0:Header>
<q0:PersonIds>
<q0:PersonId>123</q0:PersonId>
</q0:PersonIds>
<q0:RoleList>VIP</q0:RoleList>
</q0:GetPersons>

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);


Mime
View raw message